Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 meson, 6 pkg-config, 7 ninja, 8 glib, 9 gtk3, 10 nemo, 11 python3, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "nemo-python"; 16 version = "6.4.0"; 17 18 src = fetchFromGitHub { 19 owner = "linuxmint"; 20 repo = "nemo-extensions"; 21 rev = version; 22 hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y="; 23 }; 24 25 sourceRoot = "${src.name}/nemo-python"; 26 27 patches = [ 28 # Load extensions from NEMO_PYTHON_EXTENSION_DIR environment variable 29 # https://github.com/NixOS/nixpkgs/issues/78327 30 ./load-extensions-from-env.patch 31 32 # Pick up all passthru.nemoPythonExtensionDeps via nemo-with-extensions wrapper 33 ./python-path.patch 34 ]; 35 36 nativeBuildInputs = [ 37 meson 38 pkg-config 39 ninja 40 ]; 41 42 buildInputs = [ 43 glib 44 gtk3 45 nemo 46 python3 47 python3.pkgs.pygobject3 48 ]; 49 50 postPatch = '' 51 # Tries to load libpython3.so via g_module_open (). 52 substituteInPlace meson.build \ 53 --replace "get_option('prefix'), get_option('libdir')" "'${python3}/lib'" 54 ''; 55 56 PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}"; 57 58 passthru.nemoPythonExtensionDeps = [ python3.pkgs.pygobject3 ]; 59 60 meta = with lib; { 61 homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-python"; 62 description = "Python bindings for the Nemo extension library"; 63 license = licenses.gpl2Plus; 64 platforms = platforms.linux; 65 teams = [ teams.cinnamon ]; 66 }; 67}