diff --git a/byg/byg.cabal b/byg/byg.cabal index 08f8778..53eccb0 100644 --- a/byg/byg.cabal +++ b/byg/byg.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.12 +cabal-version: 3.8 name: byg version: 0.1.0.0 synopsis: The website builder for mad diff --git a/byg/default.nix b/byg/default.nix new file mode 100644 index 0000000..541d5d7 --- /dev/null +++ b/byg/default.nix @@ -0,0 +1,2 @@ +with import ./nix/common.nix; +haskell.callCabal2nix "byg" ./. { } diff --git a/byg/nix/common.nix b/byg/nix/common.nix new file mode 100644 index 0000000..e9492f6 --- /dev/null +++ b/byg/nix/common.nix @@ -0,0 +1,9 @@ +let + sources = import ./sources.nix; + pkgs = import sources.nixpkgs {}; + haskell = pkgs.haskell.packages.ghc910; +in +{ + pkgs = pkgs; + haskell = haskell; +} diff --git a/byg/shell.nix b/byg/shell.nix index db57e9a..1b72266 100644 --- a/byg/shell.nix +++ b/byg/shell.nix @@ -1,12 +1,7 @@ -let - sources = import ./nix/sources.nix; - pkgs = import sources.nixpkgs {}; - haskell = pkgs.haskell.packages.ghc910; -in -pkgs.stdenv.mkDerivation { - name = "byg"; - buildInputs = with pkgs; [ +with import ./nix/common.nix; +pkgs.mkShell { + buildInputs = [ haskell.ghc - cabal-install + pkgs.cabal-install ]; }