add nix derivation
This commit is contained in:
parent
b8a26fbb13
commit
427051dbff
12
flake.nix
12
flake.nix
|
@ -10,11 +10,15 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
python = pkgs.python3.withPackages (ps: with ps; [ markdown pelican ]);
|
python = pkgs.python3.withPackages (ps: with ps; [ markdown pelican ]);
|
||||||
|
website = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "website";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [ python ];
|
||||||
|
buildFlags = [ "publish" ];
|
||||||
|
installPhase = "cp -r output $out";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
packages.default = pkgs.writeTextDir "index.html" ''
|
packages.default = website;
|
||||||
Hello world!
|
|
||||||
This is the personal website of Paul-Nicolas Madelaine.
|
|
||||||
'';
|
|
||||||
devShells.default = pkgs.mkShell { packages = [ python ]; };
|
devShells.default = pkgs.mkShell { packages = [ python ]; };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue