Flake-enable the project

This commit is contained in:
Gabriella Gonzalez
2022-07-01 14:00:11 -07:00
parent 1881b0385b
commit 670846795d
6 changed files with 150 additions and 33 deletions

View File

@@ -1,28 +1,9 @@
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/87d9c84817d7be81850c07e8f6a362b1dfc30feb.tar.gz";
sha256 = "0pcasnmdbs2lrsp4m8ww06xd7b318agfygi61qjsizb328nxhcqa";
};
overlay = pkgsNew: pkgsOld: {
haskellPackages = pkgsOld.haskellPackages.override (old: {
overrides =
pkgsNew.lib.composeExtensions
(old.overrides or (_: _: { }))
(haskellPackagesNew: haskellPackagesOld: {
nix-serve-ng =
pkgsNew.haskell.lib.overrideCabal
(haskellPackagesNew.callPackage ./nix/nix-serve-ng.nix { })
(old: {
executableSystemDepends = (old.executableSystemDepends or []) ++ [
pkgsNew.boost.dev
];
});
});
});
};
pkgs = import nixpkgs { config = { }; overlays = [ overlay ]; };
in
pkgs.haskellPackages.nix-serve-ng.env
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash; }
) {
src = ./.;
}).shellNix