diff options
author | gbtb <goodbetterthebeast3@gmail.com> | 2022-01-23 11:38:20 +1000 |
---|---|---|
committer | Luke Granger-Brown <git@lukegb.com> | 2022-02-01 02:43:09 +0000 |
commit | 38f2d719cc9db947334dbe801144e0772de53f20 (patch) | |
tree | f103263a3af73ffd24eb7806777db95981fbb59c | |
parent | ac6dbb2d7ceca976d9046b0346f6933d543fd43e (diff) | |
download | nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar.gz nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar.bz2 nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar.lz nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar.xz nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.tar.zst nixpkgs-38f2d719cc9db947334dbe801144e0772de53f20.zip |
tortoisehg: format default.nix with nixpkgs-fmt
-rw-r--r-- | pkgs/applications/version-management/tortoisehg/default.nix | 105 |
1 files changed, 55 insertions, 50 deletions
diff --git a/pkgs/applications/version-management/tortoisehg/default.nix b/pkgs/applications/version-management/tortoisehg/default.nix index 3da14f8796e..66f3b9a0aaf 100644 --- a/pkgs/applications/version-management/tortoisehg/default.nix +++ b/pkgs/applications/version-management/tortoisehg/default.nix @@ -1,54 +1,59 @@ -{ lib, fetchurl, python3Packages -, mercurial, qt5 +{ lib +, fetchurl +, python3Packages +, mercurial +, qt5 }: python3Packages.buildPythonApplication rec { - pname = "tortoisehg"; - version = "6.0"; - - src = fetchurl { - url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz"; - sha256 = "sha256-25uQ2llF/+wqdGpun/nzlvAf286OIRmlZUISZ0szH6Y="; - }; - - # Extension point for when thg's mercurial is lagging behind mainline. - tortoiseMercurial = mercurial; - - propagatedBuildInputs = with python3Packages; [ - tortoiseMercurial qscintilla-qt5 iniparse - ]; - nativeBuildInputs = [ qt5.wrapQtAppsHook ]; - - doCheck = true; - postInstall = '' - mkdir -p $out/share/doc/tortoisehg - cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt - # convenient alias - ln -s $out/bin/thg $out/bin/tortoisehg - wrapQtApp $out/bin/thg - ''; - - checkPhase = '' - export QT_QPA_PLATFORM=offscreen - echo "test: thg smoke test" - $out/bin/thg -h > help.txt & - sleep 1s - if grep "list of commands" help.txt; then - echo "thg help output was captured. Seems like package in a working state." - exit 0 - else - echo "thg help output was not captured. Seems like package is broken." - exit 1 - fi - ''; - - passthru.mercurial = tortoiseMercurial; - - meta = { - description = "Qt based graphical tool for working with Mercurial"; - homepage = "https://tortoisehg.bitbucket.io/"; - license = lib.licenses.gpl2Only; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ danbst ]; - }; + pname = "tortoisehg"; + version = "6.0"; + + src = fetchurl { + url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz"; + sha256 = "sha256-25uQ2llF/+wqdGpun/nzlvAf286OIRmlZUISZ0szH6Y="; + }; + + # Extension point for when thg's mercurial is lagging behind mainline. + tortoiseMercurial = mercurial; + + propagatedBuildInputs = with python3Packages; [ + tortoiseMercurial + qscintilla-qt5 + iniparse + ]; + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; + + doCheck = true; + postInstall = '' + mkdir -p $out/share/doc/tortoisehg + cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt + # convenient alias + ln -s $out/bin/thg $out/bin/tortoisehg + wrapQtApp $out/bin/thg + ''; + + checkPhase = '' + export QT_QPA_PLATFORM=offscreen + echo "test: thg smoke test" + $out/bin/thg -h > help.txt & + sleep 1s + if grep "list of commands" help.txt; then + echo "thg help output was captured. Seems like package in a working state." + exit 0 + else + echo "thg help output was not captured. Seems like package is broken." + exit 1 + fi + ''; + + passthru.mercurial = tortoiseMercurial; + + meta = { + description = "Qt based graphical tool for working with Mercurial"; + homepage = "https://tortoisehg.bitbucket.io/"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ danbst ]; + }; } |