make the thing go nix
This commit is contained in:
parent
8fc7bcb788
commit
c524a4a820
32
default.nix
32
default.nix
|
@ -1,8 +1,7 @@
|
|||
{pkgs ? import <nixpkgs> {}}:
|
||||
with pkgs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "brokentech.cloud-${version}";
|
||||
version = "0.1";
|
||||
with pkgs; let
|
||||
vendoredDeps = stdenv.mkDerivation rec {
|
||||
name = "hugoVendoredDeps";
|
||||
|
||||
src = ./.;
|
||||
|
||||
|
@ -13,6 +12,31 @@ with pkgs;
|
|||
];
|
||||
|
||||
buildPhase = ''
|
||||
hugo mod vendor
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r ./_vendor/* $out
|
||||
'';
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-3suJ9/OXtEqm3eg1zCEoA0TrAN+dYu+l6YRWjB41c6w=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "brokentech.cloud-${version}";
|
||||
version = "0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
hugo
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
ln -s ${vendoredDeps} _vendor
|
||||
hugo
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue