mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-13 21:56:29 +01:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
28 lines
569 B
Nix
28 lines
569 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
pkgs,
|
|
}:
|
|
|
|
buildPythonPackage {
|
|
format = "setuptools";
|
|
inherit (pkgs.file) pname version src;
|
|
|
|
patchPhase = ''
|
|
substituteInPlace python/magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
'';
|
|
|
|
buildInputs = [ pkgs.file ];
|
|
|
|
preConfigure = "cd python";
|
|
|
|
# No test suite
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "Python wrapper around libmagic";
|
|
homepage = "http://www.darwinsys.com/file/";
|
|
license = lib.licenses.lgpl2;
|
|
};
|
|
}
|