1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/by-name/us/usbrip/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

47 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "usbrip";
version = "unstable-2021-07-02";
disabled = python3.pythonOlder "3.6";
src = fetchFromGitHub {
owner = "snovvcrash";
repo = pname;
rev = "0f3701607ba13212ebefb4bbd9e68ec0e22d76ac";
sha256 = "1vws8ybhv7szpqvlbmv0hrkys2fhhaa5bj9dywv3q2y1xmljl0py";
};
propagatedBuildInputs = with python3.pkgs; [
termcolor
terminaltables
tqdm
];
postPatch = ''
# Remove install helpers which we don't need
substituteInPlace setup.py \
--replace "parse_requirements('requirements.txt')," "[]," \
--replace "resolve('wheel')" "" \
--replace "'install': LocalInstallCommand," ""
'';
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "usbrip" ];
meta = with lib; {
description = "Tool to track the history of USB events";
mainProgram = "usbrip";
homepage = "https://github.com/snovvcrash/usbrip";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}