1
0

add non-flake package

This commit is contained in:
Rokas Puzonas 2024-03-23 21:59:42 +02:00
parent 5004e6a144
commit 4bef2b666f
2 changed files with 17 additions and 13 deletions

15
default.nix Normal file
View 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
'';
}

View File

@ -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; };
});
}