add package build

This commit is contained in:
Cadey Ratio 2020-04-08 17:49:13 -04:00
parent 02736ccb6f
commit 83c5a8ccbd
3 changed files with 27 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/target /target
result*

14
cabnytcini.nix Normal file
View File

@ -0,0 +1,14 @@
{ pkgs ? (import (import ./nix/sources.nix).nixpkgs { }) }:
let
sources = import ./nix/sources.nix;
srcNoTarget = dir:
builtins.filterSource
(path: type: type != "directory" || builtins.baseNameOf path != "target")
dir;
naersk = pkgs.callPackage sources.naersk { };
in naersk.buildPackage {
src = srcNoTarget ./.;
remapPathPrefix = true;
buildInputs = with pkgs; [ pkg-config openssl xorg.libX11 ];
}

View File

@ -1,4 +1,16 @@
{ {
"naersk": {
"branch": "master",
"description": "Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly.",
"homepage": "",
"owner": "nmattia",
"repo": "naersk",
"rev": "1dd63230066a93c61ab7a66934eb0aae3f1a3613",
"sha256": "1xn8m62ypg13jh4zf101qmfa6gy8cl923fgwvk9c33m573h3k154",
"type": "tarball",
"url": "https://github.com/nmattia/naersk/archive/1dd63230066a93c61ab7a66934eb0aae3f1a3613.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": { "niv": {
"branch": "master", "branch": "master",
"description": "Easy dependency management for Nix projects", "description": "Easy dependency management for Nix projects",