nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 64 lines 1.6 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5 qt5, 6 stdenv, 7 installShellFiles, 8}: 9 10python3.pkgs.buildPythonApplication rec { 11 pname = "vimiv-qt"; 12 version = "0.9.0"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "karlch"; 17 repo = "vimiv-qt"; 18 rev = "v${version}"; 19 sha256 = "sha256-28sk5qDVmrgXYX2wm5G8zv564vG6GwxNp+gjrFHCRfU="; 20 }; 21 22 build-system = with python3.pkgs; [ setuptools ]; 23 24 nativeBuildInputs = [ 25 installShellFiles 26 qt5.wrapQtAppsHook 27 ]; 28 29 dependencies = with python3.pkgs; [ 30 pyqt5 31 py3exiv2 32 ]; 33 34 buildInputs = [ qt5.qtsvg ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ]; 35 36 postInstall = '' 37 install -Dm644 misc/vimiv.desktop $out/share/applications/vimiv.desktop 38 install -Dm644 misc/org.karlch.vimiv.qt.metainfo.xml $out/metainfo/org.karlch.vimiv.qt.metainfo.xml 39 install -Dm644 LICENSE $out/licenses/vimiv/LICENSE 40 install -Dm644 icons/vimiv.svg $out/icons/hicolor/scalable/apps/vimiv.svg 41 installManPage misc/vimiv.1 42 43 for i in 16 32 64 128 256 512; do 44 install -Dm644 icons/vimiv_''${i}x''${i}.png $out/icons/hicolor/''${i}x''${i}/apps/vimiv.png 45 done 46 ''; 47 48 pythonImportsCheck = [ "vimiv" ]; 49 50 # Vimiv has to be wrapped manually because it is a non-ELF executable. 51 dontWrapQtApps = true; 52 preFixup = '' 53 wrapQtApp $out/bin/vimiv 54 ''; 55 56 meta = with lib; { 57 description = "Image viewer with Vim-like keybindings (Qt port)"; 58 license = licenses.gpl3Plus; 59 homepage = "https://github.com/karlch/vimiv-qt"; 60 maintainers = with maintainers; [ dschrempf ]; 61 mainProgram = "vimiv"; 62 platforms = platforms.all; 63 }; 64}