summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Biz/Bild.nix27
1 files changed, 18 insertions, 9 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index abff330..ab120db 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -38,6 +38,16 @@ rec {
# generally-useful things from nixpkgs
inherit (nixpkgs) lib stdenv sources;
+ # remove this when I switch to all-nix builds
+ bildRuntimeDeps = with nixpkgs; [
+ pkg-config
+ guile_3_0
+ private.ghcPackageSetBild
+ rustc
+ gcc
+ (private.sbclWith (p: with p; [asdf alexandria])) # just enough to build Example.lisp
+ ];
+
# a standard nix build for `bild` - this should be the only hand-written
# builder we need
bild = stdenv.mkDerivation {
@@ -45,13 +55,7 @@ rec {
src = ../.;
nativeBuildInputs = [ private.ghcPackageSetBild ];
buildInputs = [ nixpkgs.makeWrapper ];
- propagatedBuildInputs = with nixpkgs; [
- pkg-config
- guile_3_0
- rustc
- gcc
- (private.sbclWith (p: with p; [asdf alexandria])) # just enough to build Example.lisp
- ];
+ propagatedBuildInputs = bildRuntimeDeps;
strictDeps = true;
buildPhase = ''
mkdir -p $out/bin $out/lib/ghc-${private.ghcPackageSetFull.version}
@@ -124,10 +128,12 @@ rec {
installPhase = "exit 0";
} // { env = ghc; };
- env = let linters = with nixpkgs.pkgs; [ ormolu hlint deadnix ]; in nixpkgs.pkgs.mkShell {
+ env = let
+ linters = with nixpkgs.pkgs; [ ormolu hlint deadnix ];
+ in nixpkgs.pkgs.mkShell {
name = "bizdev";
# this should just be dev tools
- buildInputs = with nixpkgs.pkgs; linters ++ [
+ buildInputs = with nixpkgs.pkgs; linters ++ bildRuntimeDeps ++ [
bild
ctags
figlet
@@ -140,6 +146,9 @@ rec {
shellcheck
wemux
];
+ shellHook = ''
+ export GHC_PACKAGE_PATH=${bild}/lib/ghc-${private.ghcPackageSetFull.version}/package.conf.d
+ '';
};
# build an operating system. 'cfg' is the NixOS config