mimeo: migrate to pyproject = true, clean up installation
This commit is contained in:
@@ -12,30 +12,25 @@ in
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "mimeo";
|
||||
inherit version;
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://xyne.dev/projects/mimeo/src/mimeo-${version}.tar.xz";
|
||||
hash = "sha256-CahvSypwR1aHVDHTdtty1ZfaKBWPolxc73uZ5OyeqZA=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
file
|
||||
desktop-file-utils
|
||||
];
|
||||
build-system = [ python3Packages.setuptools ];
|
||||
|
||||
propagatedBuildInputs = [ python3Packages.pyxdg ];
|
||||
dependencies = [ python3Packages.pyxdg ];
|
||||
|
||||
preConfigure = ''
|
||||
postPatch = ''
|
||||
substituteInPlace Mimeo.py \
|
||||
--replace "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \
|
||||
"EXE_UPDATE_DESKTOP_DATABASE = '${desktop-file-utils}/bin/update-desktop-database'" \
|
||||
--replace "EXE_FILE = 'file'" \
|
||||
"EXE_FILE = '${file}/bin/file'"
|
||||
--replace-fail "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \
|
||||
"EXE_UPDATE_DESKTOP_DATABASE = '${desktop-file-utils}/bin/update-desktop-database'" \
|
||||
--replace-fail "EXE_FILE = 'file'" \
|
||||
"EXE_FILE = '${file}/bin/file'"
|
||||
'';
|
||||
|
||||
installPhase = "install -Dm755 Mimeo.py $out/bin/mimeo";
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/mimeo --help > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user