fork/nix-index

git clone https://git.julia.blue/fork/nix-index

Benno Fünfstückfix(default.nix): update to new dependencies5f3240f

v0.1.0
1.4 KiB44 linesraw
1let
2  # nixpkgs-unstable at 2017-07-21 12:12
3  nixpkgsRev = "1d78df27294017d464e60bf9b0595e7e42cfca55";
4  defaultNixpkgs = builtins.fetchTarball "github.com/NixOS/nixpkgs/archive/${nixpkgsRev}.tar.gz";
5in
6{ nixpkgs ? defaultNixpkgs }:
7
8with (import nixpkgs {}); with rustPlatform;
9
10let
11  registry = rustRegistry.overrideAttrs (old: {
12    name = "rustRegistry-2017-07-21";
13    src = fetchFromGitHub {
14      owner = "rust-lang";
15      repo = "crates.io-index";
16      rev = "25ee65416ccd75fd0bdbcc31affb119513dd2951";
17      sha256 = "1y2mlj31xpzw5h2l4rl1r74gc58lagqsmcmfj0fjgmjzv7glqcwz";
18    };
19  });
20in buildRustPackage rec {
21  name = "nix-index-${version}";
22  version = "0.1.0";
23
24  rustRegistry = registry;
25
26  src = builtins.filterSource (name: type: !lib.hasPrefix "target" (baseNameOf name) && !lib.hasPrefix "result" (baseNameOf name) && name != ".git") ./.;
27  depsSha256 = "0v145fi9bfiwvsdy7hz9lw4m2f2j8sxvixfzmjwfnq4klm51c8yl";
28  buildInputs = [pkgconfig openssl curl];
29
30  postInstall = ''
31    mkdir -p $out/etc/profile.d
32    cp ${./command-not-found.sh} $out/etc/profile.d/command-not-found.sh
33    substituteInPlace $out/etc/profile.d/command-not-found.sh \
34      --replace "@out@" "$out"
35  '';
36
37  meta = with stdenv.lib; {
38    description = "A files database for nixpkgs";
39    homepage = https://github.com/bennofs/nix-index;
40    license = with licenses; [ bsd3 ];
41    maintainers = [ maintainers.bennofs ];
42    platforms = platforms.all;
43  };
44}