summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsolomon <ssbothwell@gmail.com>2022-08-22 20:33:18 -0700
committerGitea <gitea@fake.local>2022-08-23 13:45:27 +0200
commitba24c0b31c2b0c5806909f3c982802a3b11c7586 (patch)
tree6228077d7987536ec6c3bdd56994c63afe7778a6
parentb314853838a6a3239a301014d986f7cc99318e4d (diff)
downloadxmobar-ba24c0b31c2b0c5806909f3c982802a3b11c7586.tar.gz
xmobar-ba24c0b31c2b0c5806909f3c982802a3b11c7586.tar.bz2
Updates nix flake for local development
-rw-r--r--.envrc2
-rw-r--r--.gitignore2
-rw-r--r--flake.nix21
3 files changed, 19 insertions, 6 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..988cfa6
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,2 @@
+# this line sources your `.envrc.local` file
+source_env_if_exists .envrc.local
diff --git a/.gitignore b/.gitignore
index 849bc39..c7b664a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,5 @@ tags
/stack.yaml.lock
/.dir-locals.el
/doc/web/changelog.html
+/.direnv/
+/.envrc.local
diff --git a/flake.nix b/flake.nix
index 0c79fad..7471fb9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,25 +9,34 @@
haskellPackages = prev.haskellPackages.override (old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: { }))
(hself: hsuper: {
- xmobar = hself.callCabal2nix "xmobar"
- (git-ignore-nix.lib.gitignoreSource ./.) { };
+ xmobar = prev.haskell.lib.compose.dontCheck (hself.callCabal2nix "xmobar"
+ (git-ignore-nix.lib.gitignoreSource ./.) { });
});
});
};
overlays = [ overlay ];
in flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system overlays; };
- in rec {
- devShell = pkgs.haskellPackages.shellFor {
- packages = p: [ p.xmobar ];
- buildInputs = with pkgs; [
+ dynamicLibraries = with pkgs; [
xorg.libX11
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXext
xorg.libXft
+ xorg.libXpm.out
+ xorg.libXrandr
+ xorg.libXrender
];
+ in rec {
+ devShell = pkgs.haskellPackages.shellFor {
+ packages = p: [ p.xmobar ];
+ buildInputs = with pkgs; [
+ haskellPackages.cabal-install
+ #haskellPackages.haskell-language-server
+ ] ++ dynamicLibraries;
+
+ LD_LIBRARY_PATH = pkgs.lib.strings.makeLibraryPath dynamicLibraries;
};
defaultPackage = pkgs.haskellPackages.xmobar;
}) // {