nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 57 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 replaceVars, 6 libsForQt5, 7 graphviz, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "qvge"; 12 version = "0.7.0"; 13 14 src = fetchFromGitHub { 15 owner = "ArsMasiuk"; 16 repo = "qvge"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-011gJobDqNnXFTr/XSXcONxvPlzU7UEwS7CHkz1YMtY="; 19 }; 20 21 sourceRoot = "${finalAttrs.src.name}/src"; 22 23 patches = ( 24 replaceVars ./set-graphviz-path.patch { 25 inherit graphviz; 26 } 27 ); 28 29 postPatch = '' 30 substituteInPlace qvge/linux/qvge.desktop \ 31 --replace-warn "Exec=qvgeapp" "Exec=qvge" 32 ''; 33 34 nativeBuildInputs = [ 35 libsForQt5.wrapQtAppsHook 36 libsForQt5.qmake 37 ]; 38 39 buildInputs = 40 if stdenv.hostPlatform.isDarwin then [ libsForQt5.qtsvg ] else [ libsForQt5.qtx11extras ]; 41 42 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 43 mkdir -p $out/Applications 44 mv $out/bin/qvge.app $out/Applications 45 ln -s $out/Applications/qvge.app/Contents/MacOS/qvge $out/bin/qvge 46 ''; 47 48 meta = { 49 description = "Qt Visual Graph Editor"; 50 homepage = "https://github.com/ArsMasiuk/qvge"; 51 changelog = "https://github.com/ArsMasiuk/qvge/blob/v${finalAttrs.version}/CHANGES"; 52 license = lib.licenses.mit; 53 mainProgram = "qvge"; 54 maintainers = with lib.maintainers; [ sikmir ]; 55 platforms = lib.platforms.unix; 56 }; 57})