From 3f88e14031e46eb45b7842d9e806bce588c4f93f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 24 Jan 2023 19:08:13 -0500 Subject: nix & build housekeeping --- org/config_nix.org | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'org/config_nix.org') diff --git a/org/config_nix.org b/org/config_nix.org index 21aff72..9af553c 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -87,7 +87,6 @@ if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then # source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000=" source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" fi -# reload when these files change watch_file flake.lock watch_file flake.nix nix flake update && nix flake check --show-trace && nix flake show @@ -193,9 +192,12 @@ postInstall: let pname = "spine_search"; version = "<>"; + shell = ./shell.nix; # ./default.nix; + devEnv = ./shell.nix; # ./default.nix; supportedSystems = [ "x86_64-linux" ]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); # nixpkgs instantiated for supported system types. + <> in { packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; @@ -205,8 +207,8 @@ postInstall: inherit version; executable = true; src = self; - shell = ./default.nix; - devEnv = ./devenv.nix; + inherit shell; + inherit devEnv; buildInputs = [ sqlite ]; nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ]; buildPhase = '' @@ -221,7 +223,9 @@ postInstall: dub build --compiler=$DC --build=$DC_ --combined --skip-registry=all runHook postBuild ''; - <> + inherit checkPhase; + inherit installPhase; + inherit postInstall; }; spine-search-dmd = stdenv.mkDerivation { inherit pname; @@ -229,6 +233,8 @@ postInstall: meta.mainProgram = "spine_search-dmd"; executable = true; src = self; + inherit shell; + inherit devEnv; buildInputs = [ sqlite ]; nativeBuildInputs = [ dub dmd gnumake ]; buildPhase = '' @@ -236,7 +242,9 @@ postInstall: dub build --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all runHook postBuild ''; - <> + inherit checkPhase; + inherit installPhase; + inherit postInstall; }; spine-search-ldc = stdenv.mkDerivation { inherit pname; @@ -244,6 +252,8 @@ postInstall: meta.mainProgram = "spine_search-ldc"; executable = true; src = self; + inherit shell; + inherit devEnv; buildInputs = [ sqlite ]; nativeBuildInputs = [ dub ldc gnumake ]; buildPhase = '' @@ -251,7 +261,9 @@ postInstall: dub build --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all runHook postBuild ''; - <> + inherit checkPhase; + inherit installPhase; + inherit postInstall; }; spine-search-gdc = stdenv.mkDerivation { inherit pname; @@ -259,6 +271,8 @@ postInstall: meta.mainProgram = "spine_search-gdc"; executable = true; src = self; + inherit shell; + inherit devEnv; buildInputs = [ sqlite ]; nativeBuildInputs = [ dub gdc gnumake ]; buildPhase = '' @@ -266,7 +280,9 @@ postInstall: dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all runHook postBuild ''; - <> + inherit checkPhase; + inherit installPhase; + inherit postInstall; }; #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000="; }); -- cgit v1.2.3