Compare commits

...

2 Commits

Author SHA1 Message Date
bd41cf2f64 Update deps 2022-08-18 11:26:12 +03:00
e48ec6ce3d Simplify the build setup 2022-08-18 11:24:36 +03:00
3 changed files with 8 additions and 30 deletions

1
cabal.project Normal file
View File

@ -0,0 +1 @@
packages: */*.cabal

View File

@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1637841632,
"narHash": "sha256-QYqiKHdda0EOnLGQCHE+GluD/Lq2EJj4hVTooPM55Ic=",
"lastModified": 1660646295,
"narHash": "sha256-V4G+egGRc3elXPTr7QLJ7r7yrYed0areIKDiIAlMLC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "73369f8d0864854d1acfa7f1e6217f7d6b6e3fa1",
"rev": "762b003329510ea855b4097a37511eb19c7077f0",
"type": "github"
},
"original": {

View File

@ -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; [