1 # Nix package for GNUnet development
5 # To build and install the package in the user environment, use:
11 # To build the package and add it to the nix store, use:
17 # To launch a shell with all dependencies installed in the environment, use one of the following:
20 # After entering nix-shell, build it:
27 # For all of the above commands, nixpkgs to use can be set the following way:
29 # a) by default it uses nixpkgs pinned to a known working version
31 # b) use nixpkgs from the system:
34 # c) use nixpkgs at a given path
35 # --arg pkgs /path/to/nixpkgs
39 # To enable ccache, use the following:
41 # --argstr ccache_dir /var/cache/ccache
43 # or when using nix-shell:
44 # --argstr ccache_dir ~/.ccache
46 # and make sure the given directory is writable by the nixpkgs group when using nix-build or nix-env -i,
47 # or the current user when using nix-shell
56 syspkgs = import <nixpkgs> { };
57 pinpkgs = syspkgs.fetchFromGitHub {
61 # binary cache exists for revisions in https://nixos.org/releases/nixos/<release>/<build>/git-revision
62 rev = "c4469edac1fc1fa5e5b5aa2ceadeda8f3f92d30a"; # https://nixos.org/releases/nixos/16.09/nixos-16.09beta430.c4469ed/git-revision
63 sha256 = "1x6hmf815d5anfxrxl6iivfkk60q5qxa6waa9xnwhwkbc14rhvn9";
65 usepkgs = if null == pkgs then
72 stdenv = usepkgs.stdenvAdapters.keepDebugInfo usepkgs.stdenv;
75 gnunet-dev = usepkgs.callPackage ./gnunet-dev.nix {