summaryrefslogtreecommitdiff
path: root/nix/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/package.nix')
-rw-r--r--nix/package.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nix/package.nix b/nix/package.nix
new file mode 100644
index 0000000..a9eace2
--- /dev/null
+++ b/nix/package.nix
@@ -0,0 +1,36 @@
+{
+ lib,
+ rustPlatform,
+ pkg-config,
+ glib,
+ cairo,
+ pango,
+ harfbuzz,
+}:
+
+let
+ cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
+in
+rustPlatform.buildRustPackage {
+ pname = cargoToml.package.name;
+ version = cargoToml.package.version;
+
+ src = ../.;
+
+ cargoLock.lockFile = ../Cargo.lock;
+
+ nativeBuildInputs = [ pkg-config ];
+ buildInputs = [
+ glib
+ cairo
+ pango
+ harfbuzz
+ ];
+
+ meta = {
+ description = cargoToml.package.description;
+ homepage = cargoToml.package.repository;
+ license = lib.licenses.gpl3Only;
+ mainProgram = "i3bar-river";
+ };
+}