Add basic nix expressions (#47)

Allows `nix-build` for basic building and `nix-env -f . -i` for installing.
This commit is contained in:
Jani Mustonen 2017-08-05 18:40:00 +03:00 committed by mujx
parent ccc69ece9e
commit 486676f248
4 changed files with 32 additions and 0 deletions

4
.gitignore vendored
View File

@ -71,3 +71,7 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
# Nix
result

View File

@ -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

3
default.nix Normal file
View File

@ -0,0 +1,3 @@
with import <nixpkgs> {};
qt59.callPackage ./package.nix {}

13
package.nix Normal file
View File

@ -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
'';
}