forked from nix-community/nix-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
32 lines (27 loc) · 1.08 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
let
# nixpkgs-unstable at 2019-07-06 16:03
nixpkgsRev = "df738814d1bed1a554eac1536e99253ab75ba012";
defaultNixpkgs = builtins.fetchTarball "github.com/NixOS/nixpkgs/archive/${nixpkgsRev}.tar.gz";
in
{ nixpkgs ? defaultNixpkgs }:
with (import nixpkgs {}); with rustPlatform;
buildRustPackage rec {
name = "nix-index-${version}";
version = "0.1.2";
src = builtins.filterSource (name: type: !lib.hasPrefix "target" (baseNameOf name) && !lib.hasPrefix "result" (baseNameOf name) && name != ".git") ./.;
buildInputs = [pkgconfig openssl curl];
cargoSha256 = "10cg4wf36hkzp4fbws0f6wk12zkh6gsy92raq4d6kyhp7myp7p3d";
postInstall = ''
mkdir -p $out/etc/profile.d
cp ${./command-not-found.sh} $out/etc/profile.d/command-not-found.sh
substituteInPlace $out/etc/profile.d/command-not-found.sh \
--replace "@out@" "$out"
'';
meta = with stdenv.lib; {
description = "A files database for nixpkgs";
homepage = https://github.com/bennofs/nix-index;
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.bennofs ];
platforms = platforms.all;
};
}