diff --git a/default.nix b/default.nix index 6011d03..1fee039 100644 --- a/default.nix +++ b/default.nix @@ -1,43 +1,36 @@ -{ sources ? (import ./nix/sources.nix) -, compiler ? "ghc883" +let + sources = import ./nix/sources.nix; +in +{ pkgs ? import sources.unstable { } }: let - overlay = self: super: { - haskell = super.haskell // { - packages = super.haskell.packages // { - "${compiler}" = super.haskell.packages.${compiler}.override { - overrides = hself: hsuper: with self.haskell.lib; { - ede = overrideCabal hsuper.ede ( - drv: { - src = sources."ede-trifecta-2.1"; - } - ); + hspkgs = pkgs.haskellPackages.override { + overrides = hself: hsuper: with pkgs.haskell.lib; { + ede = overrideCabal hsuper.ede ( + drv: { + src = pkgs.fetchFromGitHub { + owner = "brendanhay"; + repo = "ede"; + rev = "5e0373b8a8c83ff2078a938795e30ec8038d228c"; + sha256 = "1lb0q289p6lrc65adlacdx8xy8hrvcywbf6np7rilqdvvnyvlbgs"; }; - }; - }; + } + ); }; }; - pkgs = ( - import sources.unstable { - overlays = [ - overlay - ]; - } - ); - - inherit (pkgs.haskellPackages) + inherit (hspkgs) callCabal2nix - shellFor ; + inherit (pkgs.haskell.lib) justStaticExecutables ; + inherit (pkgs) - lib nix-gitignore ; - tag = callCabal2nix "tag" (nix-gitignore.gitignoreSource [] ./.) {}; + tag = callCabal2nix "tag" (nix-gitignore.gitignoreSource [ ] ./.) { }; in justStaticExecutables tag diff --git a/nix/sources.json b/nix/sources.json index 3a31029..46a6499 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,16 +1,4 @@ { - "ede-trifecta-2.1": { - "branch": "trifecta-2.1", - "description": "Templating language with similar syntax and features to Liquid or Jinja2.", - "homepage": "", - "owner": "pbogdan", - "repo": "ede", - "rev": "1114be9457b15aa8f40a30e058b766048fe3479a", - "sha256": "1km89ahwa4r2ly85kwzp6np807lf5n81bbbszk4yhqmx0qcxcmzg", - "type": "tarball", - "url": "https://github.com/pbogdan/ede/archive/1114be9457b15aa8f40a30e058b766048fe3479a.tar.gz", - "url_template": "https://github.com///archive/.tar.gz" - }, "unstable": { "branch": "nixos-unstable", "description": "Nix Packages collection", diff --git a/shell.nix b/shell.nix index e68acd4..dc5b5b5 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,12 @@ let - tag = (import ./default.nix {}); sources = import ./nix/sources.nix; - pkgs = (import sources.unstable {}); +in +{ pkgs ? import sources.unstable { } +}: +let + tag = import ./default.nix { + inherit pkgs; + }; in pkgs.haskellPackages.shellFor { packages = _: [