diff options
Diffstat (limited to 'flake.nix')
-rwxr-xr-x | flake.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100755 index 0000000..c568975 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "sefidel-web devshell"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + packages.sefidel-web = pkgs.stdenv.mkDerivation rec { + pname = "sefidel-web"; + version = self.shortRev or "dirty"; + + src = ./.; + nativeBuildInputs = [ pkgs.zola ]; + buildPhase = "zola build"; + installPhase = "cp -r public $out"; + }; + + defaultPackage = self.packages.${system}.sefidel-web; + + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + zola + ]; + buildInputs = [ ]; + }; + }); +} |