diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management')
33 files changed, 392 insertions, 203 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/gh/default.nix b/nixpkgs/pkgs/applications/version-management/gh/default.nix index 702040695a50..cd3c6ce6dd13 100644 --- a/nixpkgs/pkgs/applications/version-management/gh/default.nix +++ b/nixpkgs/pkgs/applications/version-management/gh/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "gh"; - version = "2.38.0"; + version = "2.39.1"; src = fetchFromGitHub { owner = "cli"; repo = "cli"; rev = "v${version}"; - hash = "sha256-t+JpCxJM2PO9nT9nYn/Rsz/s2lQQviggbjuEy0OQV88="; + hash = "sha256-OvelaxyQNeh6h7wn4Z/vRicufOoxrTdmnWl9hKW00jU="; }; - vendorHash = "sha256-XZhZDYdbjA/1g7/mPxm5u1b+z/TmwoH60/sJZ63LQMg="; + vendorHash = "sha256-RFForZy/MktbrNrcpp9G6VCB7A98liJvCxS0Yb16sMc="; nativeBuildInputs = [ installShellFiles ]; diff --git a/nixpkgs/pkgs/applications/version-management/git-codereview/default.nix b/nixpkgs/pkgs/applications/version-management/git-codereview/default.nix index 07813b849f71..4cd4c68673a7 100644 --- a/nixpkgs/pkgs/applications/version-management/git-codereview/default.nix +++ b/nixpkgs/pkgs/applications/version-management/git-codereview/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "git-codereview"; - version = "1.7.0"; + version = "1.8.0"; src = fetchFromGitHub { owner = "golang"; repo = "review"; rev = "v${version}"; - hash = "sha256-vq/rrDOZUn/apHgk6YPnfG7hmKRSapuw49ZyFVMWNqs="; + hash = "sha256-E6KgFSlWa/MKG6R2P+K4T+P/JOqaIfxdWpsSFGHbihg="; }; vendorHash = null; diff --git a/nixpkgs/pkgs/applications/version-management/git-mit/default.nix b/nixpkgs/pkgs/applications/version-management/git-mit/default.nix index a7ab4f7e9900..0f630f049ba9 100644 --- a/nixpkgs/pkgs/applications/version-management/git-mit/default.nix +++ b/nixpkgs/pkgs/applications/version-management/git-mit/default.nix @@ -10,7 +10,7 @@ }: let - version = "5.12.169"; + version = "5.12.171"; in rustPlatform.buildRustPackage { pname = "git-mit"; @@ -20,10 +20,10 @@ rustPlatform.buildRustPackage { owner = "PurpleBooth"; repo = "git-mit"; rev = "v${version}"; - hash = "sha256-+PBZZhWTm+as6eZjPq+dsUVBOIPN2qvj3zoqN2+xEmA="; + hash = "sha256-K2d12isOOPs8ba77VhQSXRHSYLZZIkZJlM9d3/G4nOo="; }; - cargoHash = "sha256-TQR9yAV4aYuMH36hvx7y47403V7h54yCed44heSkMd8="; + cargoHash = "sha256-m5b57dJ6IRJ10eJRF5lj2+WiNswHxj08LgXz7KJiTaw="; nativeBuildInputs = [ pkg-config ]; diff --git a/nixpkgs/pkgs/applications/version-management/git-quick-stats/default.nix b/nixpkgs/pkgs/applications/version-management/git-quick-stats/default.nix index 1efab8e02716..5a3a41e05b05 100644 --- a/nixpkgs/pkgs/applications/version-management/git-quick-stats/default.nix +++ b/nixpkgs/pkgs/applications/version-management/git-quick-stats/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "git-quick-stats"; - version = "2.5.1"; + version = "2.5.2"; src = fetchFromGitHub { repo = "git-quick-stats"; owner = "arzzen"; rev = version; - sha256 = "sha256-IIvpUKJxeJYKmTSzEEMZPV6JElt6Ww/Whx3ytNcha7k="; + sha256 = "sha256-ff8n8SkeppZzJO58OrPQJ0MInZCIz8nTb7lmiCC0ATg="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/version-management/gitoxide/default.nix b/nixpkgs/pkgs/applications/version-management/gitoxide/default.nix index 64efc4731a17..bd39ff17762d 100644 --- a/nixpkgs/pkgs/applications/version-management/gitoxide/default.nix +++ b/nixpkgs/pkgs/applications/version-management/gitoxide/default.nix @@ -13,16 +13,16 @@ rustPlatform.buildRustPackage rec { pname = "gitoxide"; - version = "0.30.0"; + version = "0.31.1"; src = fetchFromGitHub { owner = "Byron"; repo = "gitoxide"; rev = "v${version}"; - hash = "sha256-VJZwNLFePUNIRHEyiEr1tiLaB2tuL6Ah81LNuM/1H14="; + hash = "sha256-ML0sVsegrG96rBfpnD7GgOf9TWe/ojRo9UJwMFpDsKs="; }; - cargoHash = "sha256-vEp0wLxmmmv33oRO7eOxOoOsV87/7DQ8db5RUfqUb88="; + cargoHash = "sha256-gz4VY4a4AK9laIQo2MVTabyKzMyc7jRHrYsrfOLx+Ao="; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/nixpkgs/pkgs/applications/version-management/gitsign/default.nix b/nixpkgs/pkgs/applications/version-management/gitsign/default.nix index 5da7aab1b6f9..cf804ddfb54c 100644 --- a/nixpkgs/pkgs/applications/version-management/gitsign/default.nix +++ b/nixpkgs/pkgs/applications/version-management/gitsign/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "gitsign"; - version = "0.7.1"; + version = "0.8.0"; src = fetchFromGitHub { owner = "sigstore"; repo = pname; rev = "v${version}"; - hash = "sha256-99JpuABkPHTNy9OpvRL7aIe1ZTrs2uZvxtxZf8346Ao="; + hash = "sha256-COgoj5MrX7VBwjgfH+Ud7gp0gE7gpsYoyd0Jv4uXoec="; }; - vendorHash = "sha256-+EKC/Up48EjwfVhLTpoxctWCSMDL0kLZaRPLBl0JGFQ="; + vendorHash = "sha256-btvFro0K0+9potwForIj/7h41l+LbUE0Gym9aHaWtEE="; subPackages = [ "." diff --git a/nixpkgs/pkgs/applications/version-management/guilt/darwin-fix.patch b/nixpkgs/pkgs/applications/version-management/guilt/darwin-fix.patch new file mode 100644 index 000000000000..54c11059be64 --- /dev/null +++ b/nixpkgs/pkgs/applications/version-management/guilt/darwin-fix.patch @@ -0,0 +1,20 @@ +uname -s is used to determine the differences between the command line +utilities like stat or awk in linux and darwin. However, in nix, guilt +will be using the nix versions of this programs, not the ones +installed in the system. Therefore, guilt should use the command-line +parameters that the linux forms of these commands expect, even if it +is being run on Darwin. + +diff --git a/guilt b/guilt +index bf50343..cfc9332 100755 +--- a/guilt ++++ b/guilt +@@ -986,7 +986,7 @@ guards_file="$GUILT_DIR/$branch/guards" + pager="more" + [ ! -z "$PAGER" ] && pager="$PAGER" + +-UNAME_S=`uname -s` ++UNAME_S="Linux" + + if [ -r "$GUILT_PATH/os.$UNAME_S" ]; then + . "$GUILT_PATH/os.$UNAME_S" diff --git a/nixpkgs/pkgs/applications/version-management/guilt/default.nix b/nixpkgs/pkgs/applications/version-management/guilt/default.nix new file mode 100644 index 000000000000..664db771e93f --- /dev/null +++ b/nixpkgs/pkgs/applications/version-management/guilt/default.nix @@ -0,0 +1,92 @@ +{ asciidoc +, docbook_xml_dtd_45 +, docbook_xsl +, fetchFromGitHub +, gawk +, git +, gnused +, lib +, makeWrapper +, openssl +, perl +, stdenv +, xmlto +}: + +stdenv.mkDerivation rec { + pname = "guilt"; + version = "0.37-rc1"; + + src = fetchFromGitHub { + owner = "jeffpc"; + repo = "guilt"; + rev = "v${version}"; + sha256 = "sha256-7OgRbMGYWtGvrZxKfJe0CkpmU3AUkPebF5NyTsfXeGA="; + }; + + doCheck = true; + + patches = [ + ./guilt-help-mandir.patch + ./darwin-fix.patch + ]; + nativeBuildInputs = [ + asciidoc + docbook_xml_dtd_45 + docbook_xsl + makeWrapper + perl + xmlto + ]; + buildInputs = [ + gawk + git + gnused + ] ++ lib.optionals stdenv.isDarwin [ openssl ]; + makeFlags = [ + "PREFIX=$(out)" + ]; + + postBuild = '' + make -j $NIX_BUILD_CORES doc + ''; + + preCheck = '' + patchShebangs regression/run-tests regression/*.sh + ''; + + postInstall = '' + make PREFIX=$out install-doc + ''; + + postFixup = '' + wrapProgram $out/bin/guilt --prefix PATH : ${lib.makeBinPath buildInputs} + ''; + + meta = with lib; { + description = "Manage patches like quilt, on top of a git repository"; + longDescription = '' + Andrew Morton originally developed a set of scripts for + maintaining kernel patches outside of any SCM tool. Others + extended these into a suite called quilt]. The basic idea behind + quilt is to maintain patches instead of maintaining source + files. Patches can be added, removed or reordered, and they can + be refreshed as you fix bugs or update to a new base + revision. quilt is very powerful, but it is not integrated with + the underlying SCM tools. This makes it difficult to visualize + your changes. + + Guilt allows one to use quilt functionality on top of a Git + repository. Changes are maintained as patches which are + committed into Git. Commits can be removed or reordered, and the + underlying patch can be refreshed based on changes made in the + working directory. The patch directory can also be placed under + revision control, so you can have a separate history of changes + made to your patches. + ''; + homepage = "https://github.com/jeffpc/guilt"; + maintainers = with lib.maintainers; [ javimerino ]; + license = [ licenses.gpl2 ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/version-management/guilt/guilt-help-mandir.patch b/nixpkgs/pkgs/applications/version-management/guilt/guilt-help-mandir.patch new file mode 100644 index 000000000000..54f1149f291e --- /dev/null +++ b/nixpkgs/pkgs/applications/version-management/guilt/guilt-help-mandir.patch @@ -0,0 +1,15 @@ +nixpkgs' post-installation fixup moves the pages to share/man. Tell guilt-help so that it can find them. + +diff --git a/guilt-help b/guilt-help +index 93442a3..b29e059 100755 +--- a/guilt-help ++++ b/guilt-help +@@ -34,7 +34,7 @@ case $# in + ;; + esac + +-MANDIR=`dirname $0`/../man ++MANDIR=`dirname $0`/../share/man + MANDIR=`(cd "$MANDIR"; pwd)` + exec man -M "$MANDIR" "$page" + diff --git a/nixpkgs/pkgs/applications/version-management/gut/default.nix b/nixpkgs/pkgs/applications/version-management/gut/default.nix index ced7717a2cee..92457cdbf4c3 100644 --- a/nixpkgs/pkgs/applications/version-management/gut/default.nix +++ b/nixpkgs/pkgs/applications/version-management/gut/default.nix @@ -1,21 +1,21 @@ -{ buildGoModule +{ lib +, buildGoModule , fetchFromGitHub -, lib , nix-update-script }: buildGoModule rec { pname = "gut"; - version = "0.2.10"; + version = "0.3.0"; src = fetchFromGitHub { owner = "julien040"; repo = "gut"; rev = version; - hash = "sha256-y6GhLuTqOaxAQjDgqh1ivDwGhpYY0a6ZNDdE3Pox3is="; + hash = "sha256-l7yjZEcpsnVisd93EqIug1n0k18m4tUmCQFXC6b63cg="; }; - vendorHash = "sha256-91iyAFD/RPEkMarKKVwJ4t92qosP2Db1aQ6dmNZNDwU="; + vendorHash = "sha256-G9oDMHLmdv/vQfofTqKAf21xaGp+lvW+sedLmaj+A5A="; ldflags = [ "-s" "-w" "-X github.com/julien040/gut/src/telemetry.gutVersion=${version}" ]; @@ -24,10 +24,10 @@ buildGoModule rec { passthru.updateScript = nix-update-script { }; - meta = { - description = "An easy-to-use git client for Windows, macOS, and Linux"; - homepage = "https://github.com/slackhq/go-audit"; - maintainers = [ lib.maintainers.paveloom ]; - license = [ lib.licenses.mit ]; + meta = with lib; { + description = "An alternative git CLI"; + homepage = "https://gut-cli.dev"; + license = licenses.mit; + maintainers = with maintainers; [ paveloom ]; }; } diff --git a/nixpkgs/pkgs/applications/version-management/josh/default.nix b/nixpkgs/pkgs/applications/version-management/josh/default.nix index a9929cca64e4..5acd1a634344 100644 --- a/nixpkgs/pkgs/applications/version-management/josh/default.nix +++ b/nixpkgs/pkgs/applications/version-management/josh/default.nix @@ -30,6 +30,14 @@ rustPlatform.buildRustPackage rec { url = "https://github.com/josh-project/josh/commit/13e7565ab029206598881391db4ddc6dface692b.patch"; sha256 = "1l5syqj51sn7kcqvffwl6ggn5sq8wfkpviga860agghnw5dpf7ns"; }) + + # Merged upstream, fixes builds with newer rustc + (fetchpatch { + name = "josh-fix-builds-with-rust-173.patch"; + url = "https://github.com/josh-project/josh/commit/7b8259b81a9acabb528ddebc4ab30fc712f756fb.patch"; + sha256 = "sha256-YfrVlH6Ox05ZbmB/15HVaFlOyRTOFbYflq0edi6/X9k="; + includes = [ "josh-proxy/src/bin/josh-proxy.rs" ]; + }) ]; cargoSha256 = "0f6cvz2s8qs53b2g6xja38m24hafqla61s4r5za0a1dyndgms7sl"; diff --git a/nixpkgs/pkgs/applications/version-management/jujutsu/default.nix b/nixpkgs/pkgs/applications/version-management/jujutsu/default.nix index c86cd6e6b303..a4e68c190ae1 100644 --- a/nixpkgs/pkgs/applications/version-management/jujutsu/default.nix +++ b/nixpkgs/pkgs/applications/version-management/jujutsu/default.nix @@ -20,16 +20,16 @@ rustPlatform.buildRustPackage rec { pname = "jujutsu"; - version = "0.10.0"; + version = "0.11.0"; src = fetchFromGitHub { owner = "martinvonz"; repo = "jj"; rev = "v${version}"; - hash = "sha256-LJW4Px3K5cz6RJ4sUbwUXsp2+rzEW5wowi+DALHajYA="; + hash = "sha256-yEW7+0MnJlW0WeZ6UItaCDrihPLA52mLcu15tJwZx9w="; }; - cargoHash = "sha256-fs1cWhBFp2u3HiEx/mMnbwvgwKo97KmftA/sr4dGsiM="; + cargoHash = "sha256-xA9SDq1Kc0u8qFEPFFCic9uwE2Y/BXJzUHBCs1Czxtw="; cargoBuildFlags = [ "--bin" "jj" ]; # don't install the fake editors useNextest = true; # nextest is the upstream integration framework diff --git a/nixpkgs/pkgs/applications/version-management/meld/default.nix b/nixpkgs/pkgs/applications/version-management/meld/default.nix index 224efe8c1ac2..fc8ec7b55d1f 100644 --- a/nixpkgs/pkgs/applications/version-management/meld/default.nix +++ b/nixpkgs/pkgs/applications/version-management/meld/default.nix @@ -47,7 +47,7 @@ python3.pkgs.buildPythonApplication rec { gnome.adwaita-icon-theme ]; - propagatedBuildInputs = with python3.pkgs; [ + pythonPath = with python3.pkgs; [ pygobject3 pycairo ]; diff --git a/nixpkgs/pkgs/applications/version-management/p4d/default.nix b/nixpkgs/pkgs/applications/version-management/p4d/default.nix index e2cf8e1013c3..d7dcd1405575 100644 --- a/nixpkgs/pkgs/applications/version-management/p4d/default.nix +++ b/nixpkgs/pkgs/applications/version-management/p4d/default.nix @@ -7,23 +7,19 @@ let # Upstream replaces minor versions, so use cached URLs. srcs = { - "i686-linux" = fetchurl { - url = "https://web.archive.org/web/20220907001049/https://ftp.perforce.com/perforce/r22.1/bin.linux26x86/helix-core-server.tgz"; - sha256 = "e9cf27c9dd2fa6432745058a93896d151543aff712fce9f7322152d6ea88a12a"; - }; "x86_64-linux" = fetchurl { - url = "https://web.archive.org/web/20220907001202/https://ftp.perforce.com/perforce/r22.1/bin.linux26x86_64/helix-core-server.tgz"; - sha256 = "9c272b67574264a4f49fe846ccda24fbd4baeb282665af74b6fbccff26a43558"; + url = "https://web.archive.org/web/20231109221336id_/https://ftp.perforce.com/perforce/r23.1/bin.linux26x86_64/helix-core-server.tgz"; + sha256 = "b68c4907cf9258ab47102e8f0e489c11d528a8f614bfa45e3a2fa198639e2362"; }; "x86_64-darwin" = fetchurl { - url = "https://web.archive.org/web/20220907001334/https://ftp.perforce.com/perforce/r22.1/bin.macosx1015x86_64/helix-core-server.tgz"; - sha256 = "2500a23fe482a303bd400f0de460b7624ad3f940fef45246004b9f956e90ea45"; + url = "https://web.archive.org/web/20231109221937id_/https://ftp.perforce.com/perforce/r23.1/bin.macosx1015x86_64/helix-core-server.tgz"; + sha256 = "fcbf09787ffc29f7237839711447bf19a37ae18a8a7e19b2d30deb3715ae2c11"; }; }; in stdenv.mkDerivation { pname = "p4d"; - version = "2022.1.2305383"; + version = "2023.1.2513900"; src = assert lib.assertMsg (builtins.hasAttr stdenv.hostPlatform.system srcs) "p4d is not available for ${stdenv.hostPlatform.system}"; diff --git a/nixpkgs/pkgs/applications/version-management/pijul/default.nix b/nixpkgs/pkgs/applications/version-management/pijul/default.nix index 1ea92e333d5b..63f7bf7fbbe2 100644 --- a/nixpkgs/pkgs/applications/version-management/pijul/default.nix +++ b/nixpkgs/pkgs/applications/version-management/pijul/default.nix @@ -13,14 +13,14 @@ rustPlatform.buildRustPackage rec { pname = "pijul"; - version = "1.0.0-beta.6"; + version = "1.0.0-beta.7"; src = fetchCrate { inherit version pname; - hash = "sha256-1cIb4QsDYlOCGrQrLgEwIjjHZ3WwD2o0o0bF+OOqEtI="; + hash = "sha256-BXDz9po8i937/xYoIW4S/FddtcWxSmtRUWYIphgh060="; }; - cargoHash = "sha256-mRi0NUETTdYE/oM+Jo7gW/zNby8dPAKl6XhzP0Qzsf0="; + cargoHash = "sha256-+KF1G4bDfcjHHzZR93lIR8muO6s3j5jDobr3A7Arr+Q="; doCheck = false; nativeBuildInputs = [ installShellFiles pkg-config ]; diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/builds.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/builds.nix index 0af4b1ceee29..4831959d0fe0 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/builds.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/builds.nix @@ -8,31 +8,32 @@ , pyyaml , markdown , ansi2html +, lxml , python , unzip }: let - version = "0.83.0"; + version = "0.86.10"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "builds.sr.ht"; rev = version; - hash = "sha256-u/y+sYu/09LypWI/ngghbge5SvkuLQpray10j0SjlOo="; + hash = "sha256-frwJgwJst2/NWd8VR0KbsVwm8JfWuekkY2oIIAdh3Fw="; }; buildsrht-api = buildGoModule ({ inherit src version; pname = "buildsrht-api"; modRoot = "api"; - vendorHash = "sha256-DfVWr/4J4ZrhHpy9CXPaAQcbag/9FmDgiexcNo0lEsk="; - } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion= "0.17.20"; }); + vendorHash = "sha256-2khk7j22KON4MsuvFUNKSUpouJtVIOxE0hkh63iaxZ4="; + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.29"; }); buildsrht-worker = buildGoModule { inherit src version; sourceRoot = "${src.name}/worker"; pname = "buildsrht-worker"; - vendorHash = "sha256-y5RFPbtaGmgPpiV2Q3njeWORGZF1TJRjAbY6VgC1hek="; + vendorHash = "sha256-obdaeRwMhuiCV2kVwDo1c+rU/hmsbiL1IgAf7AcIpoc="; }; in buildPythonPackage rec { @@ -50,7 +51,9 @@ buildPythonPackage rec { celery pyyaml markdown + # Unofficial dependencies ansi2html + lxml ]; preBuild = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/core.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/core.nix index e31bc13c82ae..b413aa2c001d 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/core.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/core.nix @@ -1,94 +1,78 @@ { lib , fetchFromSourcehut -, fetchNodeModules , buildPythonPackage -, pgpy , flask -, bleach -, misaka , humanize -, html5lib -, markdown +, sqlalchemy +, sqlalchemy-utils , psycopg2 -, pygments +, markdown +, mistletoe +, bleach , requests -, sqlalchemy -, cryptography , beautifulsoup4 -, sqlalchemy-utils +, pygments +, cryptography , prometheus-client -, celery , alembic +, redis +, celery +, html5lib , importlib-metadata -, mistletoe -, minio +, tinycss2 , sassc -, nodejs -, redis +, minify }: buildPythonPackage rec { pname = "srht"; - version = "0.69.0"; + version = "0.69.15"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "core.sr.ht"; rev = version; - sha256 = "sha256-s/I0wxtPggjTkkTZnhm77PxdQjiT0Vq2MIk7JMvdupc="; + sha256 = "sha256-T9yewweqnWL3IW5PHGyAcsIWCGn1ayK2rwrHVukYpgE="; fetchSubmodules = true; }; - node_modules = fetchNodeModules { - src = "${src}/srht"; - nodejs = nodejs; - sha256 = "sha256-IWKahdWv3qJ5DNyb1GB9JWYkZxghn6wzZe68clYXij8="; - }; - patches = [ - # Disable check for npm - ./disable-npm-install.patch # Fix Unix socket support in RedisQueueCollector patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch ]; propagatedNativeBuildInputs = [ sassc - nodejs + minify ]; propagatedBuildInputs = [ - pgpy flask - bleach - misaka humanize - html5lib - markdown + sqlalchemy + sqlalchemy-utils psycopg2 - pygments - requests + markdown mistletoe - sqlalchemy - cryptography + bleach + requests beautifulsoup4 - sqlalchemy-utils + pygments + cryptography prometheus-client - - # Unofficial runtime dependencies? - celery alembic - importlib-metadata - minio redis + celery + # Used transitively through beautifulsoup4 + html5lib + # Used transitively trough bleach.css_sanitizer + tinycss2 + # Used by srht.debug + importlib-metadata ]; PKGVER = version; - preBuild = '' - cp -r ${node_modules} srht/node_modules - ''; - dontUseSetuptoolsCheck = true; pythonImportsCheck = [ "srht" ]; diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/default.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/default.nix index 9c9f6f403330..8682057b7838 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/default.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/default.nix @@ -1,19 +1,20 @@ -{ python3 +{ lib +, stdenv +, python3 , callPackage , recurseIntoAttrs , nixosTests , config +, fetchPypi }: # To expose the *srht modules, they have to be a python module so we use `buildPythonModule` # Then we expose them through all-packages.nix as an application through `toPythonApplication` # https://github.com/NixOS/nixpkgs/pull/54425#discussion_r250688781 let - fetchNodeModules = callPackage ./fetchNodeModules.nix { }; - python = python3.override { packageOverrides = self: super: { - srht = self.callPackage ./core.nix { inherit fetchNodeModules; }; + srht = self.callPackage ./core.nix { }; buildsrht = self.callPackage ./builds.nix { }; gitsrht = self.callPackage ./git.nix { }; @@ -26,6 +27,54 @@ let todosrht = self.callPackage ./todo.nix { }; scmsrht = self.callPackage ./scm.nix { }; + + # sourcehut is not (yet) compatible with SQLAlchemy 2.x + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "1.4.46"; + src = fetchPypi { + pname = "SQLAlchemy"; + inherit version; + hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA="; + }; + nativeCheckInputs = with super; [ pytestCheckHook mock ]; + disabledTestPaths = [] + # Disable incompatible tests on Darwin. + ++ lib.optionals stdenv.isDarwin [ "test/aaa_profiling" ]; + }); + + flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "2.5.1"; + format = "setuptools"; + src = fetchPypi { + pname = "Flask-SQLAlchemy"; + inherit version; + hash = "sha256-K9pEtD58rLFdTgX/PMH4vJeTbMRkYjQkECv8LDXpWRI="; + }; + propagatedBuildInputs = with self; [ + flask + sqlalchemy + ]; + }); + + # sourcehut is not (yet) compatible with factory-boy 3.x + factory-boy = super.factory-boy.overridePythonAttrs (oldAttrs: rec { + version = "2.12.0"; + src = fetchPypi { + pname = "factory_boy"; + inherit version; + hash = "sha256-+vSNYIoXNfDQo8nL9TbWT5EytUfa57pFLE2Zp56Eo3A="; + }; + nativeCheckInputs = (with super; [ + django + flask + mongoengine + pytestCheckHook + ]) ++ (with self; [ + sqlalchemy + flask-sqlalchemy + ]); + postPatch = ""; + }); }; }; in diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/disable-npm-install.patch b/nixpkgs/pkgs/applications/version-management/sourcehut/disable-npm-install.patch deleted file mode 100644 index 3a8d1c82b341..000000000000 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/disable-npm-install.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/setup.py b/setup.py -index d63bac8..e1d0c35 100755 ---- a/setup.py -+++ b/setup.py -@@ -5,9 +5,6 @@ import glob - import os - import sys - --if subprocess.call(["npm", "i"], cwd="srht") != 0: -- sys.exit(1) -- - ver = os.environ.get("PKGVER") or subprocess.run(['git', 'describe', '--tags'], - stdout=subprocess.PIPE).stdout.decode().strip() - diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/fetchNodeModules.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/fetchNodeModules.nix deleted file mode 100644 index bbc18d0442d6..000000000000 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/fetchNodeModules.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, stdenv, jq }: { src, nodejs, sha256 }: - -# Only npm >= 5.4.2 is deterministic, see: -# https://github.com/npm/npm/issues/17979#issuecomment-332701215 -assert lib.versionAtLeast nodejs.version "8.9.0"; - -stdenv.mkDerivation { - name = "node_modules"; - - outputHashAlgo = "sha256"; - outputHash = sha256; - outputHashMode = "recursive"; - - nativeBuildInputs = [ jq nodejs ]; - - buildCommand = '' - cp -r ${src}/* . - HOME=. npm install --force --ignore-scripts --only=production - for f in $(find node_modules -name package.json); do - # https://github.com/npm/npm/issues/10393 - jq -S 'delpaths(keys | map(select(startswith("_")) | [.]))' $f > $f.tmp - mv $f.tmp $f - done - mv node_modules $out - ''; -} diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index 4327e395d533..8737e4266f45 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -1,5 +1,5 @@ { unzip -, gqlgenVersion ? "0.17.2" +, gqlgenVersion ? "0.17.20" }: { overrideModAttrs = (_: { diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/git.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/git.nix index eae70b372467..3a5163f9d171 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/git.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/git.nix @@ -4,32 +4,38 @@ , buildPythonPackage , python , srht -, pygit2 , scmsrht +, pygit2 +, minio , unzip }: let - version = "0.78.20"; + version = "0.84.2"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "git.sr.ht"; rev = version; - sha256 = "sha256-rZsTtHobsgRVmMOjPa1fiKrPsNyFu/gOsmO0cTl5MqQ="; + sha256 = "sha256-sAkTsQlWtNDQ5vAhA2EeOvuJcj9A6AG8pgDyIKtr65s="; }; gitApi = buildGoModule ({ inherit src version; pname = "gitsrht-api"; modRoot = "api"; - vendorHash = "sha256-cCs9FUBusaAou9w4TDOg8GKxhRcsPbSNcQpxvFH/+so="; + vendorHash = "sha256-LAYp0zgosZnFEbtxzjuTH9++0lbxhACr705HqXJz3D0="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); gitDispatch = buildGoModule { inherit src version; pname = "gitsrht-dispatch"; modRoot = "gitsrht-dispatch"; - vendorHash = "sha256-qWXPHo86s6iuRBhRMtmD5jxnAWKdrWHtA/iSUkdw89M="; + vendorHash = "sha256-EDvSZ3/g0xDSohrsAIpNhk+F0yy8tbnTW/3tURTonMc="; + + postPatch = '' + substituteInPlace gitsrht-dispatch/main.go \ + --replace /var/log/gitsrht-dispatch /var/log/sourcehut/gitsrht-dispatch + ''; }; gitKeys = buildGoModule { @@ -37,6 +43,11 @@ let pname = "gitsrht-keys"; modRoot = "gitsrht-keys"; vendorHash = "sha256-9pojS69HCKVHUceyOpGtv9ewcxFD4WsOVsEzkmWJkF4="; + + postPatch = '' + substituteInPlace gitsrht-keys/main.go \ + --replace /var/log/gitsrht-keys /var/log/sourcehut/gitsrht-keys + ''; }; gitShell = buildGoModule { @@ -44,6 +55,11 @@ let pname = "gitsrht-shell"; modRoot = "gitsrht-shell"; vendorHash = "sha256-WqfvSPuVsOHA//86u33atMfeA11+DJhjLmWy8Ivq0NI="; + + postPatch = '' + substituteInPlace gitsrht-shell/main.go \ + --replace /var/log/gitsrht-shell /var/log/sourcehut/gitsrht-shell + ''; }; gitUpdateHook = buildGoModule { @@ -51,6 +67,11 @@ let pname = "gitsrht-update-hook"; modRoot = "gitsrht-update-hook"; vendorHash = "sha256-Bc3yPabS2S+qiroHFKrtkII/CfzBDYQ6xWxKHAME+Tc="; + + postPatch = '' + substituteInPlace gitsrht-update-hook/main.go \ + --replace /var/log/gitsrht-update-hook /var/log/sourcehut/gitsrht-update-hook + ''; }; in @@ -65,8 +86,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ srht - pygit2 scmsrht + pygit2 + minio ]; preBuild = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix index 205e4e7b1d1d..f448109a6d7d 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix @@ -12,26 +12,29 @@ buildPythonPackage rec { pname = "hgsrht"; - version = "0.31.3"; + version = "0.32.4"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hg.sr.ht"; rev = version; - sha256 = "4Qe08gqsSTMQVQBchFPEUXuxM8ZAAQGJT1EOcDjkZa0="; + sha256 = "mYkA44c9wy/Iy1h1lXkVpc9gN7rQXFm4T3YBlQ1Dj60="; vc = "hg"; }; postPatch = '' substituteInPlace Makefile \ --replace "all: api hgsrht-keys" "" + + substituteInPlace hgsrht-shell \ + --replace /var/log/hgsrht-shell /var/log/sourcehut/hgsrht-shell ''; hgsrht-api = buildGoModule ({ inherit src version; pname = "hgsrht-api"; modRoot = "api"; - vendorHash = "sha256-uIP3W7UJkP68HJUF33kz5xfg/KBiaSwMozFYmQJQkys="; + vendorHash = "sha256-vuOYpnF3WjA6kOe9MVSuVMhJBQqCmIex+QUBJrP+VDs="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); hgsrht-keys = buildGoModule { @@ -39,12 +42,17 @@ buildPythonPackage rec { pname = "hgsrht-keys"; modRoot = "hgsrht-keys"; vendorHash = "sha256-7ti8xCjSrxsslF7/1X/GY4FDl+69hPL4UwCDfjxmJLU="; + + postPatch = '' + substituteInPlace hgsrht-keys/main.go \ + --replace /var/log/hgsrht-keys /var/log/sourcehut/hgsrht-keys + ''; }; propagatedBuildInputs = [ - srht python-hglib scmsrht + srht unidiff ]; diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/hub.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/hub.nix index c3a9c509f893..6f1b17b01c3e 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/hub.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/hub.nix @@ -1,21 +1,35 @@ { lib , fetchFromSourcehut +, buildGoModule , buildPythonPackage +, python , srht , pyyaml +, unzip }: buildPythonPackage rec { pname = "hubsrht"; - version = "0.14.14"; + version = "0.17.2"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hub.sr.ht"; rev = version; - sha256 = "sha256-4n6oQ+AAvdJY/5KflxAp62chjyrlSUkmt319DKZk33w="; + sha256 = "sha256-A+lvRsPz5EBnM0gB4PJuxSMpELZTrK14ORxDbTKPXWg="; }; + postPatch = '' + substituteInPlace Makefile --replace "all: api" "" + ''; + + hubsrht-api = buildGoModule ({ + inherit src version; + pname = "hubsrht-api"; + modRoot = "api"; + vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo="; + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); + propagatedBuildInputs = [ srht pyyaml @@ -23,9 +37,13 @@ buildPythonPackage rec { preBuild = '' export PKGVER=${version} + export SRHT_PATH=${srht}/${python.sitePackages}/srht + ''; + + postInstall = '' + ln -s ${hubsrht-api}/bin/api $out/bin/hubsrht-api ''; - dontUseSetuptoolsCheck = true; pythonImportsCheck = [ "hubsrht" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/lists.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/lists.nix index b875a46fcafa..24b56b9dd3c1 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/lists.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/lists.nix @@ -3,31 +3,30 @@ , buildGoModule , buildPythonPackage , srht -, asyncpg , aiosmtpd +, asyncpg , pygit2 , emailthreads -, redis , python , unzip }: buildPythonPackage rec { pname = "listssrht"; - version = "0.51.11"; + version = "0.57.8"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "lists.sr.ht"; rev = version; - sha256 = "sha256-Qb70oOazZfmHpC5r0oMYCFdvfAeKbq3mQA8+M56YYnY="; + sha256 = "sha256-nQZRSTAyTWxcPHrRVCZ5TgcrNgrlxBFc1vRds0cQwA0="; }; listssrht-api = buildGoModule ({ inherit src version; pname = "listssrht-api"; modRoot = "api"; - vendorHash = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0="; + vendorHash = "sha256-E5Zzft9ANJT/nhhCuenZpdo3t9QYLmA+AyDyrbGectE="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); postPatch = '' @@ -37,11 +36,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ srht - pygit2 - asyncpg aiosmtpd + asyncpg + pygit2 + # Unofficial dependency emailthreads - redis ]; preBuild = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/man.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/man.nix index dadc508edd86..b01d739a0600 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/man.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/man.nix @@ -1,22 +1,35 @@ { lib , fetchFromSourcehut +, buildGoModule , buildPythonPackage , srht , pygit2 , python +, unzip }: buildPythonPackage rec { pname = "mansrht"; - version = "0.15.26"; + version = "0.16.1"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "man.sr.ht"; rev = version; - sha256 = "sha256-5xZH6DrTXMdWd26OGICp7lZ/QDjACIa7zNUJHB7jzGo="; + sha256 = "sha256-94G9/Kzt1gaQ2CaXtsJYCB6W5OTdn27XhVdpNJ9a5cE="; }; + postPatch = '' + substituteInPlace Makefile --replace "all: api" "" + ''; + + mansrht-api = buildGoModule ({ + inherit src version; + pname = "mansrht-api"; + modRoot = "api"; + vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo="; + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); + propagatedBuildInputs = [ srht pygit2 @@ -27,6 +40,10 @@ buildPythonPackage rec { export SRHT_PATH=${srht}/${python.sitePackages}/srht ''; + postInstall = '' + ln -s ${mansrht-api}/bin/api $out/bin/mansrht-api + ''; + pythonImportsCheck = [ "mansrht" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/meta.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/meta.nix index 205409bb4d94..28cab5852193 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/meta.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/meta.nix @@ -2,38 +2,34 @@ , fetchFromSourcehut , buildPythonPackage , buildGoModule -, pgpy -, srht -, redis +, alembic , bcrypt +, dnspython , qrcode +, redis +, srht , stripe -, zxcvbn -, alembic -, pystache -, dnspython -, sshpubkeys -, weasyprint , prometheus-client +, zxcvbn , python , unzip }: let - version = "0.61.3"; + version = "0.64.8"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "meta.sr.ht"; rev = version; - hash = "sha256-wMcpdRSRvxYEV163mdTGOemk62gljua89SOtwe6qGXU="; + hash = "sha256-eiNvoy68PvjZ3iwdeNPjsXJjxAXb2PMF1/HvJquWa/U="; }; metasrht-api = buildGoModule ({ inherit src version; pname = "metasrht-api"; modRoot = "api"; - vendorHash = "sha256-ZoDRGmGe9o5pn89gJ60wjSp5Cc0yxRfvdhNnbwAhmSI="; - } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.20"; }); + vendorHash = "sha256-D3stDSb99uXze49kKZgGrAq5Zmg6hkIzIpsQKlnKVtE="; + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); in buildPythonPackage rec { @@ -46,19 +42,15 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ - pgpy - srht - redis + alembic bcrypt + dnspython qrcode + redis + srht stripe - zxcvbn - alembic - pystache - sshpubkeys - weasyprint prometheus-client - dnspython + zxcvbn ]; preBuild = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/pages.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/pages.nix index abcef1648fc4..ca608438687b 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/pages.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/pages.nix @@ -6,13 +6,13 @@ buildGoModule (rec { pname = "pagessrht"; - version = "0.7.4"; + version = "0.13.0"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "pages.sr.ht"; rev = version; - sha256 = "sha256-WM9T2LS8yIqaR0PQQRgMk/tiMYcw8DZVPMqMWkj/5RY="; + sha256 = "sha256-vUN6c6cyhcLI8bKrFYKoxlBQ29VS/bowpSfBRmi47wg="; }; postPatch = '' @@ -20,7 +20,7 @@ buildGoModule (rec { --replace "all: server" "" ''; - vendorHash = "sha256-VOqY/nStqGyfWOXnJSZX8UYyp2kzcibQM2NRNysHYEc="; + vendorHash = "sha256-GKuHkUqSVBLN3k8YsFtxdmdHFkqKo9YZqDk2GBmbfWo="; postInstall = '' mkdir -p $out/share/sql/ @@ -35,4 +35,4 @@ buildGoModule (rec { }; # There is no ./loaders but this does not cause troubles # to go generate -} // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion= "0.17.9"; }) +} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }) diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix index 253ea8c0b9d6..d62ee38fc233 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "pastesrht"; - version = "0.13.8"; + version = "0.15.1"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "paste.sr.ht"; rev = version; - sha256 = "sha256-Zji9FyYUtsklYz4qyLbtduusteC7WujLCMmvZKcqYis="; + sha256 = "sha256-IUFX7/V8AWqN+iuisLAyu7lMNIUCzSMoOfcZiYJTnrM="; }; postPatch = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/scm.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/scm.nix index 1edc951cbed8..810f3007c253 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/scm.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/scm.nix @@ -2,25 +2,23 @@ , fetchFromSourcehut , buildPythonPackage , srht -, redis , pyyaml , buildsrht }: buildPythonPackage rec { pname = "scmsrht"; - version = "0.22.22"; + version = "0.22.23"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "scm.sr.ht"; rev = version; - sha256 = "sha256-iSzzyI8HZOpOb4dyt520MV/wds14fNag2+UOF09KS7w="; + sha256 = "sha256-058dOEYJDY3jtxH1VkV1CFq5CZTkauSnTWg57DCnNtw="; }; propagatedBuildInputs = [ srht - redis pyyaml buildsrht ]; diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/todo.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/todo.nix index 6b00d3793d93..0a5cefc130d5 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/todo.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/todo.nix @@ -3,9 +3,7 @@ , buildGoModule , buildPythonPackage , srht -, redis , alembic -, pystache , pytest , factory-boy , python @@ -14,13 +12,13 @@ buildPythonPackage rec { pname = "todosrht"; - version = "0.72.2"; + version = "0.74.6"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "todo.sr.ht"; rev = version; - sha256 = "sha256-FLjVO8Y/9s2gFfMXwcY7Rj3WNzPEBYs1AEjiVZFWsT8="; + sha256 = "sha256-j12pCGfKf6+9R8NOBIrH2V4OuSMuncU6S1AMWFVoHts="; }; postPatch = '' @@ -32,14 +30,12 @@ buildPythonPackage rec { inherit src version; pname = "todosrht-api"; modRoot = "api"; - vendorHash = "sha256-LB1H4jwnvoEyaaYJ09NI/M6IkgZwRet/fkso6b9EPV0="; + vendorHash = "sha256-rvfG5F6ez8UM0dYVhKfzwtb7ZEJlaKMBAfKDbo3Aofc="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); propagatedBuildInputs = [ srht - redis alembic - pystache ]; preBuild = '' diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/update.sh b/nixpkgs/pkgs/applications/version-management/sourcehut/update.sh index 54727e0317cb..e9efc0816eb1 100755 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/update.sh +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/update.sh @@ -7,16 +7,26 @@ root=../../../.. tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT +attr_path() { + case "$1" in + pagessrht) printf "sourcehut.$1";; + *) printf "sourcehut.python.pkgs.$1";; + esac +} + default() { - (cd "$root" && nix-instantiate --eval --strict -A "sourcehut.python.pkgs.$1.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/') + local p="$(attr_path "$1")" + (cd "$root" && nix-instantiate --eval --strict -A $p.meta.position | sed -re 's/^"(.*):[0-9]+"$/\1/') } version() { - (cd "$root" && nix-instantiate --eval --strict -A "sourcehut.python.pkgs.$1.version" | tr -d '"') + local p="$(attr_path "$1")" + (cd "$root" && nix-instantiate --eval --strict -A $p.version | tr -d '"') } src_url() { - nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.meta.homepage" | tr -d '"' + local p="$(attr_path "$1")" + nix-instantiate --eval --strict --expr " with import $root {}; let src = $p.drvAttrs.src; in src.meta.homepage" | tr -d '"' } get_latest_version() { @@ -35,8 +45,9 @@ update_version() { default_nix="$(default "$1")" oldVersion="$(version "$1")" version="$(get_latest_version "$1")" + local p="$(attr_path "$1")" - (cd "$root" && update-source-version "sourcehut.python.pkgs.$1" "$version") + (cd "$root" && update-source-version "$p" "$version") # Update vendorHash of Go modules retry=true diff --git a/nixpkgs/pkgs/applications/version-management/subversion/default.nix b/nixpkgs/pkgs/applications/version-management/subversion/default.nix index 6f03b139cf1b..ecb5093f4be1 100644 --- a/nixpkgs/pkgs/applications/version-management/subversion/default.nix +++ b/nixpkgs/pkgs/applications/version-management/subversion/default.nix @@ -114,6 +114,7 @@ let description = "A version control system intended to be a compelling replacement for CVS in the open source community"; license = licenses.asl20; homepage = "https://subversion.apache.org/"; + mainProgram = "svn"; maintainers = with maintainers; [ eelco lovek323 ]; platforms = platforms.linux ++ platforms.darwin; }; |