about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-03-26 16:55:25 +0900
committersefidel <contact@sefidel.net>2023-03-26 16:55:25 +0900
commit77ffc8dfeabd45cb3fac500902fcbcb7176edcc7 (patch)
tree4c3a538e0792d60ca637a3921341820087311233 /flake.nix
downloadsefidel-web-77ffc8dfeabd45cb3fac500902fcbcb7176edcc7.tar.gz
sefidel-web-77ffc8dfeabd45cb3fac500902fcbcb7176edcc7.zip
project: Initial commit
Diffstat (limited to 'flake.nix')
-rwxr-xr-xflake.nix31
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 = [ ];
+        };
+      });
+}