default.nix (1155B)
1 { 2 stdenv, 3 lib, 4 rustPlatform, 5 fetchFromSourcehut, 6 curl, 7 libiconv, 8 openssl, 9 pkg-config, 10 makeWrapper, 11 }: 12 13 rustPlatform.buildRustPackage { 14 pname = "repolocli"; 15 version = "0-unstable-2021-04-06"; 16 17 src = fetchFromSourcehut { 18 owner = "~matthiasbeyer"; 19 repo = "repolocli"; 20 rev = "32b24f4e03d0dc48db7f7d9927501b07b4821c33"; 21 hash = "sha256-hNT+DilBpzjoJBVgXTB9kU4Obh8cszXFLCTaNhiOZHM="; 22 }; 23 24 cargoPatches = [ ./cargo-lock.patch ]; 25 cargoHash = "sha256-TeOxfD6mqihBalx9lwP7qH2/LaXnPVCkTP/f16rpjJM="; 26 27 nativeBuildInputs = [ 28 pkg-config 29 makeWrapper 30 ]; 31 32 buildInputs = 33 lib.optionals stdenv.isLinux [ openssl ] 34 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 35 curl 36 libiconv 37 ]; 38 39 postInstall = '' 40 install -Dm644 repolocli.toml -t $out/etc/xdg 41 42 wrapProgram $out/bin/repolocli \ 43 --prefix XDG_CONFIG_DIRS : $out/etc/xdg 44 ''; 45 46 meta = { 47 description = "Repology commandline interface (and API)"; 48 homepage = "https://git.sr.ht/~matthiasbeyer/repolocli"; 49 license = lib.licenses.gpl2Only; 50 maintainers = [ lib.maintainers.sikmir ]; 51 broken = stdenv.isLinux; 52 }; 53 }