about summary refs log tree commit diff stats
path: root/nix/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/package.nix')
-rw-r--r--nix/package.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nix/package.nix b/nix/package.nix
new file mode 100644
index 0000000..ef00195
--- /dev/null
+++ b/nix/package.nix
@@ -0,0 +1,38 @@
+# Back - An extremely simple git bug visualization system. Inspired by TVL's
+# panettone.
+#
+# Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: AGPL-3.0-or-later
+#
+# This file is part of Back.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/agpl.txt>.
+{
+  rustPlatform,
+  lib,
+}:
+rustPlatform.buildRustPackage {
+  pname = "back";
+  version = "1.0.0";
+
+  src = lib.cleanSourceWith {
+    src = lib.cleanSource ./.;
+    filter = name: type:
+      (type == "directory")
+      || (builtins.elem (builtins.baseNameOf name) ["Cargo.toml" "Cargo.lock" "style.css"])
+      || (lib.strings.hasSuffix ".rs" (builtins.baseNameOf name))
+      || (lib.strings.hasSuffix ".html" (builtins.baseNameOf name));
+  };
+
+  doCheck = true;
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  meta = {
+    mainProgram = "back";
+  };
+}