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:
|
||||
let
|
||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.buildNpmPackage {
|
||||
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
|
||||
'';
|
||||
};
|
||||
packages.default = pkgs.callPackage ./. { inherit version; };
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user