add flake.nix
This commit is contained in:
parent
78ac32ebdd
commit
8c399a8494
2 changed files with 69 additions and 0 deletions
40
flake.lock
generated
Normal file
40
flake.lock
generated
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629481132,
|
||||
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1628077112,
|
||||
"narHash": "sha256-ehfkGNBdq0GFbezcXZP4OPcik+k4Lm7mF8NUKJlq6Ho=",
|
||||
"path": "/nix/store/gy0x00sjl3lczh2h6akhhcfyp263nmy5-source",
|
||||
"rev": "465daf79b4a23d6e47d2efddece7120da8800c63",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
29
flake.nix
Normal file
29
flake.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "Socialize web page";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
|
||||
# Package
|
||||
packages.socialize =
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "socialize";
|
||||
src = self;
|
||||
installPhase = ''
|
||||
install -m 444 -D index.html $out/index.html
|
||||
install -m 444 -D favicon.png $out/favicon.png
|
||||
'';
|
||||
};
|
||||
defaultPackage = self.packages.${system}.socialize;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue