Compare commits
No commits in common. "b46cf0bf15e85ae0c44c140976475f5aecec2adf" and "69a1f4d9216b5958b30a9f8aea2a87284a477380" have entirely different histories.
b46cf0bf15
...
69a1f4d921
21
flake.lock
21
flake.lock
@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"easy-hls": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1637250802,
|
||||
"narHash": "sha256-/crlHEVB148PGQLZCsHOR9L5qgvCAfRSocIoKgmMAhA=",
|
||||
"owner": "jkachmar",
|
||||
"repo": "easy-hls-nix",
|
||||
"rev": "7c123399ef8a67dc0e505d9cf7f2c7f64f1cd847",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jkachmar",
|
||||
"repo": "easy-hls-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1637014545,
|
||||
@ -33,6 +53,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"easy-hls": "easy-hls",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
69
flake.nix
69
flake.nix
@ -4,47 +4,54 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
easy-hls = {
|
||||
url = "github:jkachmar/easy-hls-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
outputs = { self, nixpkgs, flake-utils, easy-hls }:
|
||||
{
|
||||
}
|
||||
//
|
||||
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: {
|
||||
build-rauhala-info = f.callPackage ./site {};
|
||||
});
|
||||
} );
|
||||
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; }
|
||||
overlay = final: prev: {
|
||||
deploy-rauhala-info = with final; 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;
|
||||
build-rauhala-info = final.runCommand "site" { buildInputs = [final.makeWrapper]; }
|
||||
''
|
||||
mkdir -p $out/bin/
|
||||
cp ${final.haskellPackages.build-rauhala-info}/bin/site $out/bin/
|
||||
wrapProgram $out/bin/site --prefix PATH : ${ final.lib.makeBinPath [ final.ipfs ] }
|
||||
'';
|
||||
rauhala-info = final.callPackage ./rauhala.info { site = final.build-rauhala-info; };
|
||||
haskellPackages = prev.haskellPackages.override ( old: {
|
||||
overrides = final.lib.composeExtensions ( old.overrides or (_: _: {})) (f: p: {
|
||||
build-rauhala-info = f.callPackage ./site {};
|
||||
});
|
||||
} );
|
||||
};
|
||||
}
|
||||
//
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
|
||||
hp = pkgs.haskellPackages;
|
||||
hls = easy-hls.defaultPackage.${system};
|
||||
in
|
||||
rec {
|
||||
packages = { inherit (pkgs) build-rauhala-info rauhala-info deploy-rauhala-info; };
|
||||
applications.build-rauhala-info = flake-utils.lib.mkApp {
|
||||
drv = packages.build-rauhala-info;
|
||||
exePath = "/bin/site";
|
||||
};
|
||||
applications.deploy-rauhala-info = flake-utils.lib.mkApp {
|
||||
drv = packages.deploy-rauhala-info;
|
||||
exePath = "/bin/deploy-rauhala-info.sh";
|
||||
};
|
||||
defaultPackage = packages.rauhala-info;
|
||||
defaultApp = packages.build-rauhala-info;
|
||||
defaultApp = applications.build-rauhala-info;
|
||||
devShell = hp.shellFor {
|
||||
packages = h: [h.build-rauhala-info];
|
||||
buildInputs = with pkgs; [
|
||||
@ -52,7 +59,7 @@
|
||||
cabal-install
|
||||
stylish-haskell
|
||||
entr
|
||||
haskell-language-server
|
||||
hls
|
||||
ipfs
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user