mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +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.
34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ bash, btrfs-progs, coreutils, fetchFromGitHub, gnugrep, lib, makeWrapper, stdenvNoCC, util-linuxMinimal }:
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "btrfs-snap";
|
|
version = "1.7.3";
|
|
src = fetchFromGitHub {
|
|
owner = "jf647";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-SDzLjgNRuR9XpmcYCD9T10MLS+//+pWFGDiTAb8NiLQ=";
|
|
};
|
|
buildInputs = [ bash ];
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp btrfs-snap $out/bin/
|
|
wrapProgram $out/bin/btrfs-snap --prefix PATH : ${lib.makeBinPath [
|
|
btrfs-progs # btrfs
|
|
coreutils # cut, date, head, ls, mkdir, readlink, stat, tail, touch, test, [
|
|
gnugrep # grep
|
|
util-linuxMinimal # logger, mount
|
|
]}
|
|
'';
|
|
meta = with lib; {
|
|
description = "Create and maintain the history of snapshots of btrfs filesystems";
|
|
mainProgram = "btrfs-snap";
|
|
homepage = "https://github.com/jf647/btrfs-snap";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ lionello ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|