From 77ffc8dfeabd45cb3fac500902fcbcb7176edcc7 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 26 Mar 2023 16:55:25 +0900 Subject: project: Initial commit --- flake.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 flake.nix (limited to 'flake.nix') 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 = [ ]; + }; + }); +} -- cgit 1.4.1