mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-11 14:43:47 +00:00
![aleksana](/assets/img/avatar_default.png)
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.
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, gitUpdater
|
|
, python3Packages
|
|
, gnutar
|
|
, unzip
|
|
, lhasa
|
|
, rpm
|
|
, binutils
|
|
, cpio
|
|
, gzip
|
|
, p7zip
|
|
, cabextract
|
|
, unrar
|
|
, unshield
|
|
, bzip2
|
|
, xz
|
|
, lzip
|
|
, unzipSupport ? false
|
|
, unrarSupport ? false
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "dtrx";
|
|
version = "8.5.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dtrx-py";
|
|
repo = "dtrx";
|
|
rev = version;
|
|
sha256 = "sha256-LB3F6jcqQPRsjFO4L2fPAPnacDAdtcaadgGbwXA9LAw=";
|
|
};
|
|
|
|
makeWrapperArgs =
|
|
let
|
|
archivers = lib.makeBinPath (
|
|
[ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield bzip2 xz lzip ]
|
|
++ lib.optional (unzipSupport) unzip
|
|
++ lib.optional (unrarSupport) unrar
|
|
);
|
|
in [
|
|
''--prefix PATH : "${archivers}"''
|
|
];
|
|
|
|
nativeBuildInputs = [ python3Packages.invoke ];
|
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
meta = with lib; {
|
|
description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives";
|
|
homepage = "https://github.com/dtrx-py/dtrx";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ ];
|
|
mainProgram = "dtrx";
|
|
};
|
|
}
|