Add a default.nix for nix-build
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								byg/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								byg/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
with import ./nix/common.nix;
 | 
			
		||||
haskell.callCabal2nix "byg" ./. { }
 | 
			
		||||
							
								
								
									
										9
									
								
								byg/nix/common.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								byg/nix/common.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
let
 | 
			
		||||
  sources = import ./sources.nix;
 | 
			
		||||
  pkgs = import sources.nixpkgs {};
 | 
			
		||||
  haskell = pkgs.haskell.packages.ghc910;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  pkgs = pkgs;
 | 
			
		||||
  haskell = haskell;
 | 
			
		||||
}
 | 
			
		||||
@@ -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
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user