Add a default.nix for nix-build

This commit is contained in:
Niels G. W. Serup 2024-09-12 19:49:58 +02:00
parent 2628822373
commit 1fe7714c6b
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
4 changed files with 16 additions and 10 deletions

View File

@ -1,4 +1,4 @@
cabal-version: 3.12 cabal-version: 3.8
name: byg name: byg
version: 0.1.0.0 version: 0.1.0.0
synopsis: The website builder for mad synopsis: The website builder for mad

2
byg/default.nix Normal file
View File

@ -0,0 +1,2 @@
with import ./nix/common.nix;
haskell.callCabal2nix "byg" ./. { }

9
byg/nix/common.nix Normal file
View File

@ -0,0 +1,9 @@
let
sources = import ./sources.nix;
pkgs = import sources.nixpkgs {};
haskell = pkgs.haskell.packages.ghc910;
in
{
pkgs = pkgs;
haskell = haskell;
}

View File

@ -1,12 +1,7 @@
let with import ./nix/common.nix;
sources = import ./nix/sources.nix; pkgs.mkShell {
pkgs = import sources.nixpkgs {}; buildInputs = [
haskell = pkgs.haskell.packages.ghc910;
in
pkgs.stdenv.mkDerivation {
name = "byg";
buildInputs = with pkgs; [
haskell.ghc haskell.ghc
cabal-install pkgs.cabal-install
]; ];
} }