diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2023-02-12 18:39:54 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2023-02-15 22:13:57 +0100 |
| commit | 365a7368718fc52964eb487058a34c7a124e6989 (patch) | |
| tree | 2f9e0fe71b2edebd0a695d69025430b558da7b74 /pkgs/barista/default.nix | |
| parent | 6ea803da80558e269564c99070e92e285cf977ff (diff) | |
add pkgs
Diffstat (limited to 'pkgs/barista/default.nix')
| -rw-r--r-- | pkgs/barista/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/barista/default.nix b/pkgs/barista/default.nix new file mode 100644 index 0000000..4c38e46 --- /dev/null +++ b/pkgs/barista/default.nix @@ -0,0 +1,36 @@ +{ buildGoModule, fetchFromGitHub, wirelesstools, fontawesomeMetadata, materialDesignIconsMetadata, i3statusGo ? null }: + +let useDefaultConfig = i3statusGo == null; +in buildGoModule { + name = "barista"; + version = "autorelease"; + + src = fetchFromGitHub { + owner = "soumya92"; + repo = "barista"; + rev = "c8725f1d8765e36869eb54272f29c770ce1f2f67"; + sha256 = "19nvwrr8baf8k0pp7ph07hmjcrxm7kv5j4f2rsfa8m7hgcyarjp4"; + }; + + patchPhase = '' + mkdir main + '' + (if useDefaultConfig then # use samples/i3status/i3status.go as config + '' + mv samples/i3status/i3status.go main/i3status.go + '' else # import config and patch font loading + '' + cp ${i3statusGo} main/i3status.go + substituteInPlace main/i3status.go \ + --replace 'fontawesome.Load()' 'fontawesome.Load("${fontawesomeMetadata}")' + --replace 'mdi.Load()' 'mdi.Load("${materialDesignIconsMetadata})' + '') + # patch call to iwgetid + '' + substituteInPlace modules/wlan/wlan.go \ + --replace 'iwgetid' '${wirelesstools}/bin/iwgetid' + ''; + + subPackages = [ "main/i3status.go" ]; + + vendorSha256 = "1q8bmgv7aac29yvpvgh6hi4c33ydj7f54l7xn7jg2sjbac4f8kbk"; +} + |
