mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, openssl, zlib, e2fsprogs, bzip2 }:
|
|
|
|
let
|
|
zshCompletion = fetchurl {
|
|
url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
|
|
sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
|
|
};
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "tarsnap";
|
|
version = "1.0.40";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
|
|
sha256 = "1mbzq81l4my5wdhyxyma04sblr43m8p7ryycbpi6n78w1hwfbjmw";
|
|
};
|
|
|
|
preConfigure = ''
|
|
configureFlags="--with-bash-completion-dir=$out/share/bash-completion/completions"
|
|
'';
|
|
|
|
patchPhase = ''
|
|
substituteInPlace Makefile.in \
|
|
--replace "command -p mv" "mv"
|
|
substituteInPlace configure \
|
|
--replace "command -p getconf PATH" "echo $PATH"
|
|
'';
|
|
|
|
postInstall = ''
|
|
# Install some handy-dandy shell completions
|
|
install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
|
|
'';
|
|
|
|
buildInputs = [ openssl zlib ] ++ lib.optional stdenv.hostPlatform.isLinux e2fsprogs
|
|
++ lib.optional stdenv.hostPlatform.isDarwin bzip2;
|
|
|
|
meta = {
|
|
description = "Online backups for the truly paranoid";
|
|
homepage = "http://www.tarsnap.com/";
|
|
license = lib.licenses.unfree;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ thoughtpolice roconnor ];
|
|
mainProgram = "tarsnap";
|
|
};
|
|
}
|