Update nixpkgs, broot no longer needs overlay

This commit is contained in:
Natsu Kagami 2022-07-14 20:15:49 -04:00 committed by Natsu Kagami
parent ddf0231e3d
commit 61c870afa7
2 changed files with 7 additions and 75 deletions

View file

@ -250,11 +250,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1657086189,
"narHash": "sha256-wSiZ7wBqke9qCDOyYhAU68HT63iZQWrsxG6NlTfBzto=",
"lastModified": 1657800465,
"narHash": "sha256-KfptECgyFFKouyYtmBjqOCh9N8pUt/noSW93ov0Xnv0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e120ef6a5a7d835e19082d037f6a079e836ce8ca",
"rev": "4bc1c1bd2f5b1101443fe775bb737a812fc8b925",
"type": "github"
},
"original": {
@ -297,11 +297,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1657027964,
"narHash": "sha256-jseM2zvERPZe5yErbc3wrd6wK8gp0f+e18KJngs5qlo=",
"lastModified": 1657693803,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9e96b1562d67a90ca2f7cfb919f1e86b76a65a2c",
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2",
"type": "github"
},
"original": {

View file

@ -16,75 +16,7 @@ let
sources = final.lib.attrsets.filterAttrs (name: f: !(builtins.hasAttr "outputs" f)) inputs;
};
overlay-versioning = final: prev: {
broot = (with final; rustPlatform.buildRustPackage rec {
pname = "broot";
version = "1.14.1";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-6t2yJM3LAG1LY5MAXg/7lwmufEEO8dqOZJgQXICmLf8=";
};
cargoHash = "sha256-NsKiTsdfC1UPTLKBibVGXSx5wZubAMgIWLiEMzR5p6g=";
nativeBuildInputs = [
installShellFiles
makeWrapper
pkg-config
];
buildInputs = with final; [ libgit2 oniguruma xorg.libxcb ] ++ lib.optionals stdenv.isDarwin (with final; [
libiconv
darwin.apple_sdk.frameworks.Security
zlib
]);
RUSTONIG_SYSTEM_LIBONIG = true;
postPatch = ''
# Fill the version stub in the man page. We can't fill the date
# stub reproducibly.
substitute man/page man/broot.1 \
--replace "#version" "${version}"
'';
postInstall = ''
# Do not nag users about installing shell integration, since
# it is impure.
wrapProgram $out/bin/broot \
--set BR_INSTALL no
# Install shell function for bash.
$out/bin/broot --print-shell-function bash > br.bash
install -Dm0444 -t $out/etc/profile.d br.bash
# Install shell function for zsh.
$out/bin/broot --print-shell-function zsh > br.zsh
install -Dm0444 br.zsh $out/share/zsh/site-functions/br
# Install shell function for fish
$out/bin/broot --print-shell-function fish > br.fish
install -Dm0444 -t $out/share/fish/vendor_functions.d br.fish
# install shell completion files
OUT_DIR=$releaseDir/build/broot-*/out
installShellCompletion --bash $OUT_DIR/{br,broot}.bash
installShellCompletion --fish $OUT_DIR/{br,broot}.fish
installShellCompletion --zsh $OUT_DIR/{_br,_broot}
installManPage man/broot.1
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/broot --version | grep "${version}"
'';
meta = with lib; {
description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
homepage = "https://dystroy.org/broot/";
changelog = "https://github.com/Canop/broot/releases/tag/v${version}";
maintainers = with maintainers; [ dywedir ];
license = with licenses; [ mit ];
};
});
};
overlay-versioning = final: prev: { };
in
[
(import ./overlays/openrazer)