add non-flake package
This commit is contained in:
parent
5004e6a144
commit
4bef2b666f
15
default.nix
Normal file
15
default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ lib,
|
||||||
|
buildNpmPackage,
|
||||||
|
version ? "git",
|
||||||
|
}:
|
||||||
|
buildNpmPackage {
|
||||||
|
pname = "portfolio-website";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
npmDepsHash = "sha256-IQ96wS7EBN5D8VpDCdJJTzJky+fybIZjq4k/oASYwZk=";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/www
|
||||||
|
cp -r build/* $out/www
|
||||||
|
'';
|
||||||
|
}
|
15
flake.nix
15
flake.nix
@ -10,20 +10,9 @@
|
|||||||
flake-utils.lib.eachDefaultSystem(system:
|
flake-utils.lib.eachDefaultSystem(system:
|
||||||
let
|
let
|
||||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit system;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.default = pkgs.buildNpmPackage {
|
packages.default = pkgs.callPackage ./. { inherit version; };
|
||||||
pname = "portfolio-website";
|
|
||||||
version = version;
|
|
||||||
src = pkgs.lib.sources.cleanSource ./.;
|
|
||||||
npmDepsHash = "sha256-IQ96wS7EBN5D8VpDCdJJTzJky+fybIZjq4k/oASYwZk=";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/www
|
|
||||||
cp -r build/* $out/www
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user