about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/taffybar/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/window-managers/taffybar/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix b/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix
new file mode 100644
index 000000000000..681a5baec82c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, ghcWithPackages, makeWrapper, packages ? (x: []) }:
+
+let
+taffybarEnv = ghcWithPackages (self: [ self.taffybar ] ++ packages self);
+in stdenv.mkDerivation {
+  name = "taffybar-with-packages-${taffybarEnv.version}";
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    mkdir -p $out/bin
+    makeWrapper ${taffybarEnv}/bin/taffybar $out/bin/taffybar \
+      --set NIX_GHC "${taffybarEnv}/bin/ghc"
+  '';
+
+  meta = {
+    platforms = stdenv.lib.platforms.unix;
+    license = stdenv.lib.licenses.bsd3;
+  };
+}