summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--README.md12
-rw-r--r--default.nix3
-rw-r--r--package.nix13
4 files changed, 32 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index bfd07a85..ada23bf5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,7 @@ Icon
 Network Trash Folder
 Temporary Items
 .apdisk
+
+# Nix
+result
+
diff --git a/README.md b/README.md
index 335192e5..7395dbc9 100644
--- a/README.md
+++ b/README.md
@@ -92,6 +92,18 @@ make -C build
 
 The `nheko` binary will be located in the `build` directory.
 
+##### Nix
+
+Download the repo as mentioned above and run
+
+```bash
+nix-build
+```
+
+in the project folder. This will output a binary to `result/bin/nheko`.
+
+You can also install nheko by running `nix-env -f . -i`
+
 ### Contributing
 
 Any kind of contribution to the project is greatly appreciated. You are also
diff --git a/default.nix b/default.nix
new file mode 100644
index 00000000..b7cfec18
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,3 @@
+with import <nixpkgs> {};
+qt59.callPackage ./package.nix {}
+
diff --git a/package.nix b/package.nix
new file mode 100644
index 00000000..915f9db3
--- /dev/null
+++ b/package.nix
@@ -0,0 +1,13 @@
+{ pkgs, stdenv, qtbase, qttranslations, lmdb, mkDerivation, cmake }:
+stdenv.mkDerivation rec {
+  version = "0.1.0";
+  name = "nheko-${version}";
+  src = ./.;
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase qttranslations lmdb ];
+  installPhase = ''
+    mkdir -p $out/bin
+    cp nheko $out/bin/nheko
+  '';
+}
+