mirror of
https://github.com/nix-dot-dev/nix.dev.git
synced 2024-09-11 13:38:06 +03:00
Create simple flake definition
This commit is contained in:
parent
66e685bac9
commit
016d8247bc
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
result/
|
||||
result
|
||||
build/
|
||||
requirements_frozen.txt
|
||||
|
||||
|
29
flake.lock
Normal file
29
flake.lock
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"info": {
|
||||
"lastModified": 1592263354,
|
||||
"narHash": "sha256-1wHPn5qKfzfG06dZhpXDEg5Zt6HwvfyPPgW1tkYFejg="
|
||||
},
|
||||
"locked": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a84b797b28eb104db758b5cb2b61ba8face6744b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-20.03",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 5
|
||||
}
|
33
flake.nix
Normal file
33
flake.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
description = "nix.dev static website";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.03";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
python = import ./requirements.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
website = pkgs.stdenv.mkDerivation {
|
||||
name = "nix-dev";
|
||||
src = self;
|
||||
buildInputs = [ python.interpreter ];
|
||||
buildPhase = ''
|
||||
make html
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/html
|
||||
cp -r build/html/ $out/
|
||||
'';
|
||||
};
|
||||
|
||||
in {
|
||||
defaultPackage.x86_64-linux = website;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user