Simplify the build setup
This commit is contained in:
parent
b46cf0bf15
commit
e48ec6ce3d
1
cabal.project
Normal file
1
cabal.project
Normal file
@ -0,0 +1 @@
|
||||
packages: */*.cabal
|
25
flake.nix
25
flake.nix
@ -12,7 +12,6 @@
|
||||
//
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
# pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
hp = pkgs.haskellPackages.override ( old: {
|
||||
overrides = pkgs.lib.composeExtensions ( old.overrides or (_: _: {})) (f: p: {
|
||||
@ -21,30 +20,8 @@
|
||||
} );
|
||||
in
|
||||
rec {
|
||||
# packages = { inherit (pkgs) build-rauhala-info rauhala-info deploy-rauhala-info; };
|
||||
packages.build-rauhala-info = pkgs.runCommand "site" { buildInputs = [pkgs.makeWrapper]; }
|
||||
''
|
||||
mkdir -p $out/bin/
|
||||
cp ${hp.build-rauhala-info}/bin/site $out/bin/
|
||||
wrapProgram $out/bin/site --prefix PATH : ${ pkgs.lib.makeBinPath [ pkgs.ipfs ] }
|
||||
'';
|
||||
apps.build-rauhala-info = flake-utils.lib.mkApp {
|
||||
drv = packages.build-rauhala-info;
|
||||
exePath = "/bin/site";
|
||||
};
|
||||
packages.deploy-rauhala-info = with pkgs; runCommand "deploy-rauhala-info.sh" { inherit bash ipfs; }
|
||||
''
|
||||
mkdir -p $out/bin/
|
||||
substituteAll ${./support/deploy-rauhala-info.sh} $out/bin/deploy-rauhala-info.sh
|
||||
chmod u+x $out/bin/deploy-rauhala-info.sh
|
||||
'';
|
||||
packages.rauhala-info = pkgs.callPackage ./rauhala.info { site = packages.build-rauhala-info; };
|
||||
apps.deploy-rauhala-info = flake-utils.lib.mkApp {
|
||||
drv = pkgs.deploy-rauhala-info;
|
||||
exePath = "/bin/deploy-rauhala-info.sh";
|
||||
};
|
||||
packages.rauhala-info = pkgs.callPackage ./rauhala.info { site = hp.build-rauhala-info; };
|
||||
defaultPackage = packages.rauhala-info;
|
||||
defaultApp = packages.build-rauhala-info;
|
||||
devShell = hp.shellFor {
|
||||
packages = h: [h.build-rauhala-info];
|
||||
buildInputs = with pkgs; [
|
||||
|
Loading…
Reference in New Issue
Block a user