push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "gh-actions-cache";
version = "1.0.4";
src = fetchFromGitHub {
owner = "actions";
repo = "gh-actions-cache";
rev = "v${version}";
hash = "sha256-GVha3xxLTBTiKfAjGb2q9btsGYzWQivGLyZ4Gg0s/N0=";
};
vendorHash = "sha256-4/Zt+ga3abEPtR0FjWIsDpOiG1bfVtVuLuXP8aHbzqk=";
ldflags = [
"-s"
"-w"
];
# Needed for tests.
# https://github.com/actions/gh-actions-cache/issues/53#issuecomment-1464954495
env.GH_TOKEN = "dummy-token-to-facilitate-rest-client";
meta = {
description = "gh extension to manage GitHub Actions caches";
homepage = "https://github.com/actions/gh-actions-cache";
changelog = "https://github.com/actions/gh-actions-cache/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ amesgen ];
mainProgram = "gh-actions-cache";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
fetchCrate,
rustPlatform,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "gh-cal";
version = "0.1.3";
src = fetchCrate {
inherit pname version;
hash = "sha256-x9DekflZoXxH964isWCi6YuV3v/iIyYOuRYVgKaUBx0=";
};
cargoHash = "sha256-myfvPAeWuFHQcHXfkTYRfXVQ5ZBrdzQlaqHljbS0ppg=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
meta = with lib; {
description = "GitHub contributions calender terminal viewer";
homepage = "https://github.com/mrshmllow/gh-cal";
license = licenses.mit;
maintainers = with maintainers; [ loicreynier ];
mainProgram = "gh-cal";
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
buildPackages,
fetchFromGitHub,
buildGoModule,
nix-update-script,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "gh-classroom";
version = "0.1.15";
src = fetchFromGitHub {
owner = "github";
repo = "gh-classroom";
tag = "v${finalAttrs.version}";
hash = "sha256-s7S7rk5I0mdXZh4pz1aF0btntuse3mpSZe/JiS/KlkU=";
};
vendorHash = "sha256-7P1TTv6EW351EbLT+oruztE5Zs9I01uRnel+OGUdV6M=";
ldflags = [
"-s"
"-w"
"-X main.Version=${finalAttrs.version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd gh-classroom \
--bash <(${emulator} $out/bin/gh-classroom --bash-completion) \
--fish <(${emulator} $out/bin/gh-classroom --fish-completion) \
--zsh <(${emulator} $out/bin/gh-classroom --zsh-completion)
''
);
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/github/gh-classroom";
description = "Extension for the GitHub CLI, that enhances it for educators using GitHub classroom";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ _0x5a4 ];
mainProgram = "gh-classroom";
};
})

View File

@@ -0,0 +1,49 @@
{
coreutils,
fetchFromGitHub,
gh,
lib,
makeWrapper,
nix-update-script,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation rec {
pname = "gh-contribs";
version = "0.10.1";
src = fetchFromGitHub {
owner = "MintArchit";
repo = "gh-contribs";
rev = "v${version}";
hash = "sha256-fqyxq/lpMcLXOYY0MNI5uv8Go2erpg7dEIsEI+ExSVI=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
install -D -m755 "gh-contribs" "$out/bin/gh-contribs"
'';
postFixup = ''
wrapProgram "$out/bin/gh-contribs" \
--prefix PATH : "${
lib.makeBinPath [
coreutils
gh
]
}"
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/MintArchit/gh-contribs";
description = "GitHub Contribution Graph CLI";
maintainers = [ lib.maintainers.vinnymeller ];
license = lib.licenses.unlicense;
mainProgram = "gh-contribs";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,62 @@
{
stdenv,
lib,
fetchurl,
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
systemToPlatform = {
"x86_64-linux" = {
name = "linux-amd64";
hash = "sha256-bDAhFU18dliKlKY5WQVsVSMVyF4YeTaKO9pwheMcdcg=";
};
"aarch64-linux" = {
name = "linux-arm64";
hash = "sha256-uddWn2RxQyB9s7kx6FI/oH9L/7l/fMD/7HQXWDqvuyQ=";
};
"x86_64-darwin" = {
name = "darwin-amd64";
hash = "sha256-L+lCmI1ciYInCt5aTcSVRDW0IwecGZ2BZNKrpeEE4jo=";
};
"aarch64-darwin" = {
name = "darwin-arm64";
hash = "sha256-9ldVRUhHM2OD+BaOCqVmaE+HFP5jj+hrfyB6wobjS+E=";
};
};
platform = systemToPlatform.${system} or throwSystem;
in
stdenv.mkDerivation (finalAttrs: {
pname = "gh-copilot";
version = "1.1.1";
src = fetchurl {
name = "gh-copilot";
url = "https://github.com/github/gh-copilot/releases/download/v${finalAttrs.version}/${platform.name}";
hash = platform.hash;
};
dontUnpack = true;
installPhase = ''
runHook preInstall
install -m755 -D $src $out/bin/gh-copilot
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
changelog = "https://github.com/github/gh-copilot/releases/tag/v${finalAttrs.version}";
description = "Ask for assistance right in your terminal";
homepage = "https://github.com/github/gh-copilot";
license = lib.licenses.unfree;
mainProgram = "gh-copilot";
maintainers = with lib.maintainers; [ perchun ];
platforms = lib.attrNames systemToPlatform;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,43 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch
set -euo pipefail
set -x
ROOT="$(dirname "$(readlink -f "$0")")"
NIX_DRV="$ROOT/package.nix"
if [ ! -f "$NIX_DRV" ]; then
echo "ERROR: cannot find gh-copilot in $ROOT"
exit 1
fi
fetch_arch() {
VER="$1"; ARCH="$2"
URL="https://github.com/github/gh-copilot/releases/download/v${VER}/${ARCH}";
nix-prefetch "{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = \"vere\"; version = \"${VER}\";
src = fetchurl { url = \"$URL\"; };
}
"
}
replace_sha() {
# https://stackoverflow.com/a/38470458/22235705
sed -rziE "s@($1[^\n]*\n[^\n]*hash = )\"sha256-.{44}\";@\1\"$2\";@" "$NIX_DRV"
}
VERE_VER=$(curl https://api.github.com/repos/github/gh-copilot/releases/latest | jq .tag_name)
VERE_VER=$(echo $VERE_VER | sed -e 's/^"v//' -e 's/"$//') # transform "v1.0.2" into 1.0.2
VERE_LINUX_X64_SHA256=$(fetch_arch "$VERE_VER" "linux-amd64")
VERE_LINUX_AARCH64_SHA256=$(fetch_arch "$VERE_VER" "linux-arm64")
VERE_DARWIN_X64_SHA256=$(fetch_arch "$VERE_VER" "darwin-amd64")
VERE_DARWIN_AARCH64_SHA256=$(fetch_arch "$VERE_VER" "darwin-arm64")
sed -i "s/version = \".*\"/version = \"$VERE_VER\"/" "$NIX_DRV"
replace_sha "linux-amd64" "$VERE_LINUX_X64_SHA256"
replace_sha "linux-arm64" "$VERE_LINUX_AARCH64_SHA256"
replace_sha "darwin-amd64" "$VERE_DARWIN_X64_SHA256"
replace_sha "darwin-arm64" "$VERE_DARWIN_AARCH64_SHA256"

View File

@@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
buildGoModule,
testers,
gh-dash,
}:
buildGoModule rec {
pname = "gh-dash";
version = "4.17.0";
src = fetchFromGitHub {
owner = "dlvhdr";
repo = "gh-dash";
rev = "v${version}";
hash = "sha256-uQc5s5CLR5uKieD1+YMzahKNBqsddLwX+CTThzWPnwY=";
};
vendorHash = "sha256-IsEz6hA8jnWP+2ELkZ6V5Y0/rpTz1tAzaYJvzgPQQCo=";
ldflags = [
"-s"
"-w"
"-X github.com/dlvhdr/gh-dash/v4/cmd.Version=${version}"
];
checkFlags = [
# requires network
"-skip=TestFullOutput"
];
passthru.tests = {
version = testers.testVersion { package = gh-dash; };
};
meta = {
changelog = "https://github.com/dlvhdr/gh-dash/releases/tag/${src.rev}";
description = "Github Cli extension to display a dashboard with pull requests and issues";
homepage = "https://www.gh-dash.dev";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ amesgen ];
mainProgram = "gh-dash";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
let
version = "0.1.5";
in
buildGoModule {
pname = "gh-eco";
inherit version;
src = fetchFromGitHub {
owner = "jrnxf";
repo = "gh-eco";
tag = "v${version}";
hash = "sha256-Xtlz+u31hO81M53V0ZUtxmOgJ60zlspgVyCr181QrRE=";
};
vendorHash = "sha256-mPZQPjZ+nnsRMYnSWDM9rYeAPvPwAp3vLZXwTNNHSx0=";
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
meta = {
homepage = "https://github.com/coloradocolby/gh-eco";
description = "gh extension to explore the ecosystem";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ helium ];
mainProgram = "gh-eco";
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
fetchFromGitHub,
stdenvNoCC,
makeBinaryWrapper,
gh,
fzf,
coreutils,
gawk,
gnused,
withBat ? false,
bat,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gh-f";
version = "1.9.0";
src = fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "gh-f";
tag = "v${finalAttrs.version}";
hash = "sha256-QWk9bGjfsIFa/0kAmA2QUmk87iyHdlvblYxML5XmbJ8=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
propagatedUserEnvPkgs = [
gh
fzf
coreutils
gawk
gnused
]
++ lib.optional withBat bat;
installPhase = ''
runHook preInstall
install -D -m755 "gh-f" "$out/bin/gh-f"
runHook postInstall
'';
postFixup = ''
wrapProgram "$out/bin/gh-f" \
--suffix PATH : ${lib.makeBinPath finalAttrs.propagatedUserEnvPkgs}
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/gennaro-tedesco/gh-f";
description = "GitHub CLI ultimate FZF extension";
license = lib.licenses.unlicense;
mainProgram = "gh-f";
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
loicreynier
yiyu
];
};
})

162
pkgs/by-name/gh/gh-gei/deps.json generated Normal file
View File

@@ -0,0 +1,162 @@
[
{
"pname": "AWSSDK.Core",
"version": "3.7.300.11",
"hash": "sha256-caMB7fnnhohE/Oxc7GYKd6zfseqUPDM6Jt69tJr1wJA="
},
{
"pname": "AWSSDK.S3",
"version": "3.7.304",
"hash": "sha256-GEw62plWPGSlhDT0cLa2lFZ6BmSnorbXeaPmc8jRVEI="
},
{
"pname": "Azure.Core",
"version": "1.36.0",
"hash": "sha256-lokfjW2wvgFu6bALLzNmDhXIz3HXoPuGX0WfGb9hmpI="
},
{
"pname": "Azure.Storage.Blobs",
"version": "12.19.1",
"hash": "sha256-E7QHJrhQjQjGhFq4GoQpyVGR6uKfA91NGcyziRfdr2U="
},
{
"pname": "Azure.Storage.Common",
"version": "12.18.1",
"hash": "sha256-M10Ov1bBV1/U8R3Sp05apS3qFHONQRmAQakQsd17X8I="
},
{
"pname": "Microsoft.Bcl.AsyncInterfaces",
"version": "1.1.1",
"hash": "sha256-fAcX4sxE0veWM1CZBtXR/Unky+6sE33yrV7ohrWGKig="
},
{
"pname": "Microsoft.Bcl.AsyncInterfaces",
"version": "6.0.0",
"hash": "sha256-49+H/iFwp+AfCICvWcqo9us4CzxApPKC37Q5Eqrw+JU="
},
{
"pname": "Microsoft.CodeAnalysis.Analyzers",
"version": "3.3.4",
"hash": "sha256-qDzTfZBSCvAUu9gzq2k+LOvh6/eRvJ9++VCNck/ZpnE="
},
{
"pname": "Microsoft.CodeAnalysis.Common",
"version": "4.7.0",
"hash": "sha256-nDDpCy8WQADxo7LzWkDupuxs0GCjvuhX8EeKpjTnRP4="
},
{
"pname": "Microsoft.CodeAnalysis.CSharp",
"version": "4.7.0",
"hash": "sha256-0FoP+zHqbhLhyjTPx8I7MCfHqCbmhwE8aRCVe4eC49M="
},
{
"pname": "Microsoft.Extensions.DependencyInjection",
"version": "7.0.0",
"hash": "sha256-N2DHyHiaNvYDQ77f8HI0gE0uIX2aj/rvejVGdCXRP4g="
},
{
"pname": "Microsoft.Extensions.DependencyInjection.Abstractions",
"version": "7.0.0",
"hash": "sha256-55lsa2QdX1CJn1TpW1vTnkvbGXKCeE9P0O6AkW49LaA="
},
{
"pname": "Microsoft.Extensions.Http",
"version": "7.0.0",
"hash": "sha256-PHLmTf8/qmhLO/8IdotsRCoIA2cczhefgw7gOf8Iy6Q="
},
{
"pname": "Microsoft.Extensions.Logging",
"version": "7.0.0",
"hash": "sha256-rr/NXIZ/3FG5FYGrHD7iIIr12AksP4CnfUy1YvEdDa8="
},
{
"pname": "Microsoft.Extensions.Logging.Abstractions",
"version": "7.0.0",
"hash": "sha256-uoMkX/TnwP0YabThacTMmyxdc9itQp73CN7xEFFox74="
},
{
"pname": "Microsoft.Extensions.Options",
"version": "7.0.0",
"hash": "sha256-pj9I/2HpCU7bLu002/Bb5NF+ofUrJ3IyH7yVqfP8IC0="
},
{
"pname": "Microsoft.Extensions.Primitives",
"version": "7.0.0",
"hash": "sha256-AGnfNNDvZDGZ0Er9JQxeyLoUbVH+jfXF3anFr12qk6w="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.3",
"hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc="
},
{
"pname": "Polly",
"version": "7.2.4",
"hash": "sha256-wQvK3XmQlplyI/duVkhM+iRhikGBLwrQ8cpcFJSIcFM="
},
{
"pname": "System.Collections.Immutable",
"version": "7.0.0",
"hash": "sha256-9an2wbxue2qrtugYES9awshQg+KfJqajhnhs45kQIdk="
},
{
"pname": "System.CommandLine",
"version": "2.0.0-beta4.22272.1",
"hash": "sha256-zSO+CYnMH8deBHDI9DHhCPj79Ce3GOzHCyH1/TiHxcc="
},
{
"pname": "System.CommandLine.NamingConventionBinder",
"version": "2.0.0-beta4.22272.1",
"hash": "sha256-Ffzs51XiFraSX1efQRO1IyiNraIgi8aOdkRRzCT6DB4="
},
{
"pname": "System.Diagnostics.DiagnosticSource",
"version": "6.0.1",
"hash": "sha256-Xi8wrUjVlioz//TPQjFHqcV/QGhTqnTfUcltsNlcCJ4="
},
{
"pname": "System.IO.Hashing",
"version": "6.0.0",
"hash": "sha256-gSxLJ/ujWthLknylguRv40mwMl/qNcqnFI9SNjQY6lE="
},
{
"pname": "System.Linq.Async",
"version": "6.0.1",
"hash": "sha256-uH5fZhcyQVtnsFc6GTUaRRrAQm05v5euJyWCXSFSOYI="
},
{
"pname": "System.Memory.Data",
"version": "1.0.2",
"hash": "sha256-XiVrVQZQIz4NgjiK/wtH8iZhhOZ9MJ+X2hL2/8BrGN0="
},
{
"pname": "System.Numerics.Vectors",
"version": "4.5.0",
"hash": "sha256-qdSTIFgf2htPS+YhLGjAGiLN8igCYJnCCo6r78+Q+c8="
},
{
"pname": "System.Reflection.Metadata",
"version": "7.0.0",
"hash": "sha256-GwAKQhkhPBYTqmRdG9c9taqrKSKDwyUgOEhWLKxWNPI="
},
{
"pname": "System.Runtime.CompilerServices.Unsafe",
"version": "6.0.0",
"hash": "sha256-bEG1PnDp7uKYz/OgLOWs3RWwQSVYm+AnPwVmAmcgp2I="
},
{
"pname": "System.Text.Encodings.Web",
"version": "4.7.2",
"hash": "sha256-CUZOulSeRy1CGBm7mrNrTumA9od9peKiIDR/Nb1B4io="
},
{
"pname": "System.Text.Json",
"version": "4.7.2",
"hash": "sha256-xA8PZwxX9iOJvPbfdi7LWjM2RMVJ7hmtEqS9JvgNsoM="
},
{
"pname": "System.Threading.Tasks.Extensions",
"version": "4.5.4",
"hash": "sha256-owSpY8wHlsUXn5xrfYAiu847L6fAKethlvYx97Ri1ng="
}
]

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
}:
buildDotnetModule rec {
pname = "gh-gei";
version = "1.18.1";
src = fetchFromGitHub {
owner = "github";
repo = "gh-gei";
rev = "v${version}";
hash = "sha256-ZMFom0irZa63Nzx7wViinmN6yRfiHxQFprJdIx1Ak2Y=";
};
dotnet-sdk = dotnetCorePackages.sdk_8_0_4xx;
projectFile = "src/gei/gei.csproj";
nugetDeps = ./deps.json; # File generated with `nix-build -A gh-gei.passthru.fetch-deps`.
meta = with lib; {
homepage = "https://github.com/github/gh-gei";
description = "Migration CLI for GitHub to GitHub migrations";
license = licenses.mit;
maintainers = with maintainers; [ lafrenierejm ];
mainProgram = "gei";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "gh-i";
version = "0.0.10";
src = fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "gh-i";
rev = "v${version}";
hash = "sha256-k1xfQxRh8T0SINtbFlIVNFEODYU0RhBAkjudOv1bLvw=";
};
vendorHash = "sha256-eqSAwHFrvBxLl5zcZyp3+1wTf7+JmpogFBDuVgzNm+w=";
ldflags = [ "-s" ];
meta = {
description = "Search github issues interactively";
changelog = "https://github.com/gennaro-tedesco/gh-i/releases/tag/v${version}";
homepage = "https://github.com/gennaro-tedesco/gh-i";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ phanirithvij ];
mainProgram = "gh-i";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
buildGoModule,
gh-markdown-preview,
testers,
}:
buildGoModule rec {
pname = "gh-markdown-preview";
version = "1.10.1";
src = fetchFromGitHub {
owner = "yusukebe";
repo = "gh-markdown-preview";
rev = "v${version}";
hash = "sha256-jvdNAxPAr3ieOhUWeALmopeN06mZZJ+zBDFVl7gsYoc=";
};
vendorHash = "sha256-O6Q9h5zcYAoKLjuzGu7f7UZY0Y5rL2INqFyJT2QZJ/E=";
ldflags = [
"-s"
"-w"
"-X github.com/yusukebe/gh-markdown-preview/cmd.Version=${version}"
];
# Tests need network
doCheck = false;
passthru.tests = {
version = testers.testVersion { package = gh-markdown-preview; };
};
meta = {
description = "gh extension to preview Markdown looking like on GitHub";
homepage = "https://github.com/yusukebe/gh-markdown-preview";
changelog = "https://github.com/yusukebe/gh-markdown-preview/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ amesgen ];
mainProgram = "gh-markdown-preview";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
fetchFromGitHub,
stdenvNoCC,
makeWrapper,
gh,
gnugrep,
fzf,
python3,
withDelta ? false,
delta,
withBat ? false,
bat,
}:
let
binPath = lib.makeBinPath (
[
gh
gnugrep
fzf
python3
]
++ lib.optional withBat bat
++ lib.optional withDelta delta
);
in
stdenvNoCC.mkDerivation {
pname = "gh-notify";
version = "0-unstable-2024-08-01";
src = fetchFromGitHub {
owner = "meiji163";
repo = "gh-notify";
rev = "556df2eecdc0f838244a012759da0b76bcfeb2e7";
hash = "sha256-WKv/1AW8wtl7kQ3PE7g2N0ELvdHtons7pYb0K8wsfWg=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
install -D -m755 "gh-notify" "$out/bin/gh-notify"
'';
postFixup = ''
wrapProgram "$out/bin/gh-notify" --prefix PATH : "${binPath}"
'';
meta = with lib; {
homepage = "https://github.com/meiji163/gh-notify";
description = "GitHub CLI extension to display GitHub notifications";
maintainers = with maintainers; [ loicreynier ];
license = licenses.unlicense;
mainProgram = "gh-notify";
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
}:
buildGoModule (finalAttrs: {
pname = "gh-ost";
version = "1.1.7";
src = fetchFromGitHub {
owner = "github";
repo = "gh-ost";
tag = "v${finalAttrs.version}";
hash = "sha256-TTc69dWasqMVwwJNo+M9seMKEWgerZ2ZR7dwDfM1gWI=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X main.AppVersion=${finalAttrs.version}"
];
checkFlags =
let
# Skip tests that require docker daemon
skippedTests = [
"TestApplier"
"TestEventsStreamer"
"TestMigrator"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
meta = {
description = "Triggerless online schema migration solution for MySQL";
homepage = "https://github.com/github/gh-ost";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aaronjheng ];
mainProgram = "gh-ost";
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "gh-poi";
version = "0.14.1";
src = fetchFromGitHub {
owner = "seachicken";
repo = "gh-poi";
rev = "v${version}";
hash = "sha256-HwFmSeDPpX1zbJh+0laekphmpnAsEdFBhgoLfT7CCYY=";
};
ldflags = [
"-s"
"-w"
];
vendorHash = "sha256-ciOJpVqSPJJLX/sqrztqB3YSoMUrEnn52gGddE80rV0=";
# Skip checks because some of test suites require fixture.
# See: https://github.com/seachicken/gh-poi/blob/v0.14.1/.github/workflows/contract-test.yml#L28-L29
doCheck = false;
meta = with lib; {
changelog = "https://github.com/seachicken/gh-poi/releases/tag/${src.rev}";
description = "GitHub CLI extension to safely clean up your local branches";
homepage = "https://github.com/seachicken/gh-poi";
license = licenses.mit;
maintainers = with maintainers; [ aspulse ];
mainProgram = "gh-poi";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "gh-s";
version = "0.0.12";
src = fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "gh-s";
rev = "v${version}";
hash = "sha256-+jAJicvk6N2PfOTBR5H9nP3xTiBq4oYfNLvxN4sKvh4=";
};
vendorHash = "sha256-5UJAgsPND6WrOZZ5PUZNdwd7/0NPdhD1SaZJzZ+2VvM=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Search github repositories interactively";
homepage = "https://github.com/gennaro-tedesco/gh-s";
license = licenses.asl20;
maintainers = with maintainers; [ daru-san ];
mainProgram = "gh-s";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "gh-screensaver";
version = "2.0.1";
src = fetchFromGitHub {
owner = "vilmibm";
repo = "gh-screensaver";
rev = "v${version}";
hash = "sha256-MqwaqXGP4E+46vpgftZ9bttmMyENuojBnS6bWacmYLE=";
};
vendorHash = "sha256-o9B6Q07GP/CFekG3av01boZA7FdZg4x8CsLC3lwhn2A=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "gh extension with animated terminal screensavers";
homepage = "https://github.com/vilmibm/gh-screensaver";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ foo-dogsquared ];
mainProgram = "gh-screensaver";
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
bash,
gh,
git,
jq,
makeWrapper,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gh-signoff";
version = "0.2.1"; # version is in the script
src = fetchFromGitHub {
owner = "basecamp";
repo = "gh-signoff";
rev = "24f274070c9dfbb3916347dbf6f9d38d4fb64eca"; # Repo didn't have a valid Git tag for specific version
hash = "sha256-jqRbh4To6uHoohkNZrzgmGWOBp/Mahmjm5NwXjmshhM=";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [ bash ];
strictDeps = true;
runtimeDeps = [
gh
git
jq
];
installPhase = ''
runHook preInstall
install -D -m755 "gh-signoff" "$out/bin/gh-signoff"
runHook postInstall
'';
postFixup = ''
wrapProgram "$out/bin/gh-signoff" \
--prefix PATH : "${lib.makeBinPath finalAttrs.runtimeDeps}"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "GitHub CLI extension for local CI to sign off on your own work";
homepage = "https://github.com/basecamp/gh-signoff";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ maikotan ];
mainProgram = "gh-signoff";
inherit (gh.meta) platforms;
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "gh-skyline";
version = "0.1.7";
src = fetchFromGitHub {
owner = "github";
repo = "gh-skyline";
tag = "v${version}";
hash = "sha256-yc9NaWx1jV2YUpPz2u9irikkLw1cnManq+AXREvCfII=";
};
vendorHash = "sha256-fPXpgiCA9k8tYQ2leCb+XR34OGJZ6YWCFAxG9mTeXoI=";
ldflags = [
"-s"
"-w"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Generate a 3D model of your GitHub contribution history";
homepage = "https://github.com/github/gh-skyline";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ perchun ];
mainProgram = "gh-skyline";
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
fetchFromGitHub,
buildGoModule,
installShellFiles,
stdenv,
testers,
gh,
}:
buildGoModule rec {
pname = "gh";
version = "2.81.0";
src = fetchFromGitHub {
owner = "cli";
repo = "cli";
tag = "v${version}";
hash = "sha256-uhmVIDTkMRFS1MZitjDjylrYWd/q9aGAZNiTjzmqwPw=";
};
vendorHash = "sha256-rVNKTr3b4zShPfkiEBx7LqVQY2eMrXo/s8iC5tyQZNo=";
nativeBuildInputs = [ installShellFiles ];
# N.B.: using the Makefile is intentional.
# We pass "nixpkgs" for build.Date to avoid `gh --version` reporting a very old date.
buildPhase = ''
runHook preBuild
make GO_LDFLAGS="-s -w -X github.com/cli/cli/v${lib.versions.major version}/internal/build.Date=nixpkgs" GH_VERSION=${version} bin/gh ${lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) "manpages"}
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 bin/gh -t $out/bin
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installManPage share/man/*/*.[1-9]
installShellCompletion --cmd gh \
--bash <($out/bin/gh completion -s bash) \
--fish <($out/bin/gh completion -s fish) \
--zsh <($out/bin/gh completion -s zsh)
''
+ ''
runHook postInstall
'';
# most tests require network access
doCheck = false;
passthru.tests.version = testers.testVersion {
package = gh;
};
meta = {
description = "GitHub CLI tool";
homepage = "https://cli.github.com/";
changelog = "https://github.com/cli/cli/releases/tag/v${version}";
license = lib.licenses.mit;
mainProgram = "gh";
maintainers = with lib.maintainers; [ zowoq ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication rec {
pname = "gh2md";
version = "2.5.1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-01r/x9SrxCUN/wrEAWopHDAEEJdwKiWL9mERylaNAlA=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
six
requests
python-dateutil
];
# uses network
doCheck = false;
pythonImportsCheck = [ "gh2md" ];
meta = with lib; {
description = "Export Github repository issues to markdown files";
mainProgram = "gh2md";
homepage = "https://github.com/mattduck/gh2md";
license = licenses.mit;
maintainers = with maintainers; [ artturin ];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ghauri";
version = "1.3.8";
pyproject = true;
src = fetchFromGitHub {
owner = "r0oth3x49";
repo = "ghauri";
tag = version;
hash = "sha256-GEUuQMtp8XO32uOIILWiMfngPXx/3vCKk+YbA0E13rg=";
};
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
chardet
colorama
requests
tldextract
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"ghauri"
];
meta = {
description = "Tool for detecting and exploiting SQL injection security flaws";
homepage = "https://github.com/r0oth3x49/ghauri";
changelog = "https://github.com/r0oth3x49/ghauri/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "ghauri";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchFromGitHub,
git,
makeWrapper,
}:
buildGoModule rec {
pname = "ghbackup";
version = "1.13.0";
src = fetchFromGitHub {
owner = "qvl";
repo = "ghbackup";
rev = "v${version}";
hash = "sha256-3LSe805VrbUGjqjnhTJD2KBVZ4rq+4Z3l4d0I1MrBMA=";
};
patches = [ ./patches/fix-next-page-logic.patch ];
postPatch = ''
go mod init qvl.io/ghbackup
'';
nativeBuildInputs = [ makeWrapper ];
vendorHash = null;
postFixup = ''
wrapProgram $out/bin/${meta.mainProgram} \
--prefix PATH : "${lib.makeBinPath [ git ]}"
'';
doCheck = false; # tests want to actually download from github
meta = with lib; {
description = "Backup your GitHub repositories with a simple command-line application written in Go";
homepage = "https://github.com/qvl/ghbackup";
license = licenses.mit;
mainProgram = "ghbackup";
maintainers = with maintainers; [ lenny ];
};
}

View File

@@ -0,0 +1,66 @@
From 9825efc51387fef14fdb184e7061b313a54fcb86 Mon Sep 17 00:00:00 2001
From: Ronan Barrett <ronan.barrett@voiapp.io>
Date: Mon, 8 May 2023 15:54:39 +0200
Subject: [PATCH 1/2] fix next page logic
---
ghbackup/fetch.go | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/ghbackup/fetch.go b/ghbackup/fetch.go
index 93cce1c..bcef8ad 100644
--- a/ghbackup/fetch.go
+++ b/ghbackup/fetch.go
@@ -126,11 +126,17 @@ func getNextURL(header http.Header) string {
if len(parts) == 0 {
return ""
}
- firstLink := parts[0]
- if !strings.Contains(firstLink, "rel=\"next\"") {
+ var nextLink string
+ for _, v := range parts {
+ if strings.Contains(v, "rel=\"next\"") {
+ nextLink = strings.TrimSpace(v)
+ }
+ }
+ if nextLink == "" {
return ""
}
- parts = strings.Split(firstLink, ";")
+
+ parts = strings.Split(nextLink, ";")
if len(parts) == 0 {
return ""
}
@@ -140,3 +146,4 @@ func getNextURL(header http.Header) string {
}
return urlInBrackets[1 : len(urlInBrackets)-1]
}
+
From 5f696939f668cd88c59c05fd8e0d6ad9f236dea5 Mon Sep 17 00:00:00 2001
From: Ronan Barrett <ronan.barrett@voiapp.io>
Date: Mon, 8 May 2023 16:44:47 +0200
Subject: [PATCH 2/2] add break
---
ghbackup/fetch.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ghbackup/fetch.go b/ghbackup/fetch.go
index bcef8ad..b045c38 100644
--- a/ghbackup/fetch.go
+++ b/ghbackup/fetch.go
@@ -130,6 +130,7 @@ func getNextURL(header http.Header) string {
for _, v := range parts {
if strings.Contains(v, "rel=\"next\"") {
nextLink = strings.TrimSpace(v)
+ break
}
}
if nextLink == "" {
@@ -146,4 +147,3 @@ func getNextURL(header http.Header) string {
}
return urlInBrackets[1 : len(urlInBrackets)-1]
}
-

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "filesystem";
version = "1.5.14";
src = fetchFromGitHub {
owner = "gulrak";
repo = "filesystem";
tag = "v${finalAttrs.version}";
hash = "sha256-XZ0IxyNIAs2tegktOGQevkLPbWHam/AOFT+M6wAWPFg=";
};
nativeBuildInputs = [ cmake ];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Header-only single-file C++ std::filesystem compatible helper library";
homepage = "https://github.com/gulrak/filesystem";
changelog = "https://github.com/gulrak/filesystem/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
bbjubjub
getchoo
];
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "ghciwatch";
version = "1.1.5";
src = fetchFromGitHub {
owner = "MercuryTechnologies";
repo = "ghciwatch";
rev = "v${version}";
hash = "sha256-K7BNGRilzi01loE0yS4CZFDNz8TQ9Z+fELO5HUvGObE=";
};
cargoHash = "sha256-kH5YTadpaUXDma+7SfBJxrOIsd9Gm0EU3MfhFmQ3U80=";
# integration tests are not run but the macros need this variable to be set
GHC_VERSIONS = "";
checkFlags = "--test \"unit\"";
meta = with lib; {
description = "Ghci-based file watching recompiler for Haskell development";
homepage = "https://github.com/MercuryTechnologies/ghciwatch";
license = licenses.mit;
maintainers = with maintainers; [
mangoiv
_9999years
];
mainProgram = "ghciwatch";
};
passthru.updateScript = nix-update-script { };
}

View File

@@ -0,0 +1,8 @@
simple-tb.vhd:71:5:@700ms:(report note): 32
simple-tb.vhd:71:5:@900ms:(report note): 78
simple-tb.vhd:71:5:@1100ms:(report note): 105
simple-tb.vhd:71:5:@1300ms:(report note): 120
simple-tb.vhd:71:5:@1500ms:(report note): 79
simple-tb.vhd:71:5:@1700ms:(report note): 83
simple-tb.vhd:71:5:@1900ms:(report note): 32
simple-tb.vhd:75:1:@2100ms:(report note): All tests passed.

View File

@@ -0,0 +1,140 @@
{
stdenv,
fetchFromGitHub,
callPackage,
gnat,
zlib,
llvm,
lib,
gcc-unwrapped,
texinfo,
gmp,
mpfr,
libmpc,
gnutar,
glibc,
makeWrapper,
backend ? "mcode",
}:
assert backend == "mcode" || backend == "llvm" || backend == "gcc";
stdenv.mkDerivation (finalAttrs: {
pname = "ghdl-${backend}";
version = "5.1.1";
src = fetchFromGitHub {
owner = "ghdl";
repo = "ghdl";
rev = "v${finalAttrs.version}";
hash = "sha256-vPeODNTptxIjN6qLoIHaKOFf3P3iAK2GloVreHPaAz8=";
};
LIBRARY_PATH = "${stdenv.cc.libc}/lib";
nativeBuildInputs = [
gnat
]
++ lib.optionals (backend == "gcc") [
texinfo
makeWrapper
];
buildInputs = [
zlib
]
++ lib.optionals (backend == "llvm") [
llvm
]
++ lib.optionals (backend == "gcc") [
gmp
mpfr
libmpc
];
propagatedBuildInputs = [
]
++ lib.optionals (backend == "llvm" || backend == "gcc") [
zlib
];
preConfigure = ''
# If llvm 7.0 works, 7.x releases should work too.
sed -i 's/check_version 7.0/check_version 7/g' configure
''
+ lib.optionalString (backend == "gcc") ''
${gnutar}/bin/tar -xf ${gcc-unwrapped.src}
'';
configureFlags = [
# See https://github.com/ghdl/ghdl/pull/2058
"--disable-werror"
"--enable-synth"
]
++ lib.optionals (backend == "llvm") [
"--with-llvm-config=${llvm.dev}/bin/llvm-config"
]
++ lib.optionals (backend == "gcc") [
"--with-gcc=gcc-${gcc-unwrapped.version}"
];
buildPhase = lib.optionalString (backend == "gcc") ''
make copy-sources
mkdir gcc-objs
cd gcc-objs
../gcc-${gcc-unwrapped.version}/configure \
--with-native-system-header-dir=/include \
--with-build-sysroot=${lib.getDev glibc} \
--prefix=$out \
--enable-languages=c,vhdl \
--disable-bootstrap \
--disable-lto \
--disable-multilib \
--disable-libssp \
--disable-libgomp \
--disable-libquadmath
make -j $NIX_BUILD_CORES
make install
cd ../
make -j $NIX_BUILD_CORES ghdllib
'';
postFixup = lib.optionalString (backend == "gcc") ''
wrapProgram $out/bin/ghdl \
--set LIBRARY_PATH ${
lib.makeLibraryPath [
glibc
]
}
'';
hardeningDisable = [
]
++ lib.optionals (backend == "gcc") [
# GCC compilation fails with format errors
"format"
];
enableParallelBuilding = true;
passthru = {
# run with:
# nix-build -A ghdl-mcode.passthru.tests
# nix-build -A ghdl-llvm.passthru.tests
# nix-build -A ghdl-gcc.passthru.tests
tests = {
simple = callPackage ./test-simple.nix { inherit backend; };
};
};
meta = {
homepage = "https://github.com/ghdl/ghdl";
description = "VHDL 2008/93/87 simulator";
license = lib.licenses.gpl2Plus;
mainProgram = "ghdl";
maintainers = with lib.maintainers; [
lucus16
thoughtpolice
];
platforms =
lib.platforms.linux ++ lib.optionals (backend == "mcode" || backend == "llvm") [ "x86_64-darwin" ];
};
})

View File

@@ -0,0 +1,78 @@
library ieee;
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
library STD;
use STD.textio.all;
entity tb is
end tb;
architecture beh of tb is
component simple
port (
CLK, RESET : in std_ulogic;
DATA_OUT : out std_ulogic_vector(7 downto 0);
DONE_OUT : out std_ulogic
);
end component;
signal data : std_ulogic_vector(7 downto 0) := "00100000";
signal clk : std_ulogic;
signal RESET : std_ulogic := '0';
signal done : std_ulogic := '0';
signal cyclecount : integer := 0;
constant cycle_time_c : time := 200 ms;
constant maxcycles : integer := 100;
begin
simple1 : simple
port map (
CLK => clk,
RESET => RESET,
DATA_OUT => data,
DONE_OUT => done
);
clk_process : process
begin
clk <= '0';
wait for cycle_time_c/2;
clk <= '1';
wait for cycle_time_c/2;
end process;
count_process : process(CLK)
begin
if (CLK'event and CLK ='1') then
if (RESET = '1') then
cyclecount <= 0;
else
cyclecount <= cyclecount + 1;
end if;
end if;
end process;
test : process
begin
RESET <= '1';
wait until (clk'event and clk='1');
wait until (clk'event and clk='1');
RESET <= '0';
wait until (clk'event and clk='1');
for cyclecnt in 1 to maxcycles loop
exit when done = '1';
wait until (clk'event and clk='1');
report integer'image(to_integer(unsigned(data)));
end loop;
wait until (clk'event and clk='1');
report "All tests passed." severity NOTE;
wait;
end process;
end beh;

View File

@@ -0,0 +1,45 @@
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.ALL;
use IEEE.STD_LOGIC_MISC.or_reduce;
entity simple is
port (
CLK, RESET : in std_ulogic;
DATA_OUT : out std_ulogic_vector(7 downto 0);
DONE_OUT : out std_ulogic
);
end simple;
architecture beh of simple is
signal data : std_ulogic_vector(7 downto 0);
signal done: std_ulogic;
begin
proc_ctr : process(CLK)
begin
if (CLK = '1' and CLK'event) then
if (RESET = '1') then
data <= "01011111";
done <= '0';
else
case data is
when "00100000" => data <= "01001110";
when "01001110" => data <= "01101001";
when "01101001" => data <= "01111000";
when "01111000" => data <= "01001111";
when "01001111" => data <= "01010011";
when others => data <= "00100000";
end case;
done <= not or_reduce(data xor "01010011");
end if;
end if;
end process;
DATA_OUT <= data;
DONE_OUT <= done;
end beh;

View File

@@ -0,0 +1,42 @@
{
stdenv,
ghdl-llvm,
ghdl-mcode,
ghdl-gcc,
backend,
}:
let
ghdl =
if backend == "llvm" then
ghdl-llvm
else if backend == "gcc" then
ghdl-gcc
else
ghdl-mcode;
in
stdenv.mkDerivation {
name = "ghdl-test-simple";
meta.timeout = 300;
nativeBuildInputs = [ ghdl ];
buildCommand = ''
cp ${./simple.vhd} simple.vhd
cp ${./simple-tb.vhd} simple-tb.vhd
mkdir -p ghdlwork
ghdl -a --workdir=ghdlwork --ieee=synopsys simple.vhd simple-tb.vhd
ghdl -e --workdir=ghdlwork --ieee=synopsys -o sim-simple tb
''
+ (
if backend == "llvm" || backend == "gcc" then
''
./sim-simple --assert-level=warning > output.txt
''
else
''
ghdl -r --workdir=ghdlwork --ieee=synopsys tb > output.txt
''
)
+ ''
diff output.txt ${./expected-output.txt} && touch $out
'';
}

View File

@@ -0,0 +1,42 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ghdorker";
version = "0.3.2";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-wF4QoXxH55SpdYgKLHf4sCwUk1rkCpSdnIX5FvFi/BU=";
};
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
ghapi
glom
python-dotenv
pyyaml
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"GHDorker"
];
meta = with lib; {
description = "Extensible GitHub dorking tool";
mainProgram = "ghdorker";
homepage = "https://github.com/dtaivpp/ghdorker";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,86 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
gi-docgen,
meson,
ninja,
gnome,
desktop-file-utils,
gettext,
itstool,
gtk4,
libadwaita,
glib,
atk,
gobject-introspection,
vala,
wrapGAppsHook4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ghex";
version = "48.0";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchurl {
url = "mirror://gnome/sources/ghex/${lib.versions.major finalAttrs.version}/ghex-${finalAttrs.version}.tar.xz";
hash = "sha256-qh0KtfdDBKqjGYehgtQh1j8ZzgJGXXxkJpbjFhI+MKg=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
itstool
meson
ninja
pkg-config
gi-docgen
gobject-introspection
vala
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
atk
glib
];
mesonFlags = [
"-Dgtk_doc=true"
"-Dvapi=true"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# mremap does not exist on darwin
"-Dmmap-buffer-backend=false"
];
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "ghex";
};
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/ghex";
changelog = "https://gitlab.gnome.org/GNOME/ghex/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
description = "Hex editor for GNOME desktop environment";
mainProgram = "ghex";
platforms = platforms.linux;
license = licenses.gpl2Plus;
teams = [ teams.gnome ];
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "ghfetch";
version = "0.0.19";
src = fetchFromGitHub {
owner = "orangekame3";
repo = "ghfetch";
rev = "v${version}";
hash = "sha256-Cmyd/wrobHPyG9ExUSfSsTwFUfbo9iuvmAr0uqunWWw=";
};
vendorHash = "sha256-CPh9j5PJOSNvqgq/S9w+Kx3c5yIMHjc1AaqLwz9efeY=";
meta = with lib; {
description = "CLI tool to fetch GitHub user information and show like neofetch";
homepage = "https://github.com/orangekame3/ghfetch";
license = licenses.mit;
mainProgram = "ghfetch";
maintainers = with maintainers; [ aleksana ];
};
}

View File

@@ -0,0 +1,250 @@
{
diff-lcs = {
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0rwvjahnp7cpmracd8x732rjgnilqv2sx7d1gfrysslc3h039fa9";
type = "gem";
};
version = "1.5.0";
};
docile = {
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1lxqxgq71rqwj1lpl9q1mbhhhhhhdkkj7my341f2889pwayk85sz";
type = "gem";
};
version = "1.4.0";
};
ghi = {
dependencies = [ "pygments.rb" ];
groups = [ "default" ];
platforms = [ ];
source = {
path = ./.;
type = "path";
};
version = "1.2.0";
};
hpricot = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1jn8x9ch79gqmnzgyz78kppavjh5lqx0y0r6frykga2b86rz9s6z";
type = "gem";
};
version = "0.8.6";
};
json = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0nrmw2r4nfxlfgprfgki3hjifgrcrs3l5zvm3ca3gb4743yr25mn";
type = "gem";
};
version = "2.3.0";
};
mustache = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch";
type = "gem";
};
version = "1.1.1";
};
"pygments.rb" = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "047mjyzz8v4kkgi1ap6fsjf7kcp6dwirpnigif00ss0hxsxchhac";
type = "gem";
};
version = "2.3.0";
};
rake = {
groups = [ "development" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w";
type = "gem";
};
version = "13.0.6";
};
rdiscount = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "16srf8cr8ynlafyh6ls654b9a3bqgai8n3y86zzv9mcpvlk6k27g";
type = "gem";
};
version = "2.2.0.2";
};
ronn = {
dependencies = [
"hpricot"
"mustache"
"rdiscount"
];
groups = [ "development" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07plsxxfx5bxdk72ii9za6km0ziqlq8jh3bicr4774dalga6zpw2";
type = "gem";
};
version = "0.7.3";
};
rspec = {
dependencies = [
"rspec-core"
"rspec-expectations"
"rspec-mocks"
];
groups = [ "test" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "19dyb6rcvgi9j2mksd29wfdhfdyzqk7yjhy1ai77559hbhpg61w9";
type = "gem";
};
version = "3.11.0";
};
rspec-core = {
dependencies = [ "rspec-support" ];
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "118hkfw9b11hvvalr7qlylwal5h8dihagm9xg7k4gskg7587hca6";
type = "gem";
};
version = "3.11.0";
};
rspec-expectations = {
dependencies = [
"diff-lcs"
"rspec-support"
];
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "001ihayil7jpfxdlxlhakvz02kx0nk5m1w0bz6z8izdx0nc8bh53";
type = "gem";
};
version = "3.11.0";
};
rspec-mocks = {
dependencies = [
"diff-lcs"
"rspec-support"
];
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0y38dc66yhnfcf4ky3k47c20xak1rax940s4a96qkjxqrniy5ys3";
type = "gem";
};
version = "3.11.0";
};
rspec-support = {
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0xfk4pla77251n39zf4n792m1rhg5sn1kp63yvpvvysany34la03";
type = "gem";
};
version = "3.11.0";
};
rspec_junit_formatter = {
dependencies = [ "rspec-core" ];
groups = [ "test" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1sm4yj6149v4pisnizplh58ahaqri2v6p7gyzybqy1ql0zwignxy";
type = "gem";
};
version = "0.3.0";
};
simplecov = {
dependencies = [
"docile"
"simplecov-html"
"simplecov_json_formatter"
];
groups = [ "test" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1hrv046jll6ad1s964gsmcq4hvkr3zzr6jc7z1mns22mvfpbc3cr";
type = "gem";
};
version = "0.21.2";
};
simplecov-html = {
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0yx01bxa8pbf9ip4hagqkp5m0mqfnwnw2xk8kjraiywz4lrss6jb";
type = "gem";
};
version = "0.12.3";
};
simplecov_json_formatter = {
groups = [
"default"
"test"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0a5l0733hj7sk51j81ykfmlk2vd5vaijlq9d5fn165yyx3xii52j";
type = "gem";
};
version = "0.1.4";
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
bundlerEnv,
tree,
}:
let
version = "1.2.1";
src = fetchFromGitHub {
owner = "drazisil";
repo = "ghi";
tag = version;
hash = "sha256-3V1lxI4VhP0jC3VSWyNS327gOCKowbbLB6ae1idpFFI=";
};
rubyEnv = bundlerEnv {
name = "ghi";
gemfile = "${src}/Gemfile";
lockfile = "${src}/Gemfile.lock";
gemset = ./gemset.nix;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "ghi";
inherit version src;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ rubyEnv.wrappedRuby ];
installPhase = ''
mkdir -p $out/bin
cp ghi $out/bin
'';
meta = {
description = "GitHub Issues on the command line";
mainProgram = "ghi";
homepage = "https://github.com/drazisil/ghi";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sigmanificient ];
};
})

View File

@@ -0,0 +1,42 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "ghmap";
version = "1.0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "uhourri";
repo = "ghmap";
tag = "v${version}";
hash = "sha256-liwkJfNp2Ozph3ummrh2GEshIlmVsG8Y8Pmm4lw2Ya8=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
tqdm
];
pythonImportsCheck = [
"ghmap"
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
meta = {
description = "Python tool for mapping GitHub events to contributor activities";
homepage = "https://github.com/uhourri/ghmap";
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "ghmap";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "ghorg";
version = "1.11.4";
src = fetchFromGitHub {
owner = "gabrie30";
repo = "ghorg";
rev = "v${version}";
sha256 = "sha256-uhcQT/IgQZ36FMXtLWiSmXJj0BvN8NbpYhO+JslVf6Y=";
};
doCheck = false;
vendorHash = null;
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ghorg \
--bash <($out/bin/ghorg completion bash) \
--fish <($out/bin/ghorg completion fish) \
--zsh <($out/bin/ghorg completion zsh)
'';
meta = with lib; {
description = "Quickly clone an entire org/users repositories into one directory";
longDescription = ''
ghorg allows you to quickly clone all of an orgs, or users repos into a
single directory. This can be useful in many situations including
- Searching an orgs/users codebase with ack, silver searcher, grep etc..
- Bash scripting
- Creating backups
- Onboarding
- Performing Audits
'';
homepage = "https://github.com/gabrie30/ghorg";
license = licenses.asl20;
maintainers = with maintainers; [ vidbina ];
mainProgram = "ghorg";
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ghost-cli";
version = "1.28.3";
src = fetchFromGitHub {
owner = "TryGhost";
repo = "Ghost-CLI";
tag = "v${finalAttrs.version}";
hash = "sha256-hmLEkYivIH3uNOz6umEYU+A843a7d1M31OE5RCQ9WRQ=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-ncZ5ULF1nE0vl+WISfEGZKtABT+pkJtWjHMkT1BjPCE=";
};
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = ''${placeholder "out"}/bin/ghost'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "CLI Tool for installing & updating Ghost";
mainProgram = "ghost";
homepage = "https://ghost.org/docs/ghost-cli/";
changelog = "https://github.com/TryGhost/Ghost-CLI/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cything ];
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ghost";
version = "8.0.0";
format = "pyproject";
disabled = python3.pythonOlder "3.7";
src = fetchFromGitHub {
owner = "EntySec";
repo = "Ghost";
rev = version;
sha256 = "13p3inw7v55na8438awr692v9vb7zgf5ggxpha9r3m8vfm3sb4iz";
};
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
adb-shell
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "ghost" ];
meta = with lib; {
description = "Android post-exploitation framework";
mainProgram = "ghost";
homepage = "https://github.com/EntySec/ghost";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,89 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs,
faketty,
openssl,
prisma,
prisma-engines,
}:
buildNpmPackage rec {
pname = "ghostfolio";
version = "2.206.0";
src = fetchFromGitHub {
owner = "ghostfolio";
repo = "ghostfolio";
tag = version;
hash = "sha256-tlaCm3Q6Z8/rjFf/ekp5cNlyH1IPCutH1Q9B0fQBzLU=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;
postFetch = ''
date -u -d "@$(git -C $out log -1 --pretty=%ct)" +%s%3N > $out/SOURCE_DATE_EPOCH
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
npmDepsHash = "sha256-SbASljZ1Bk9bm4ev53qo+xfCz5mUeRn+GPl3pA9MXnA=";
nativeBuildInputs = [
prisma
faketty
];
# Disallow cypress from downloading binaries in sandbox
env.CYPRESS_INSTALL_BINARY = "0";
buildPhase = ''
runHook preBuild
prisma generate
substituteInPlace replace.build.mjs \
--replace-fail 'new Date()' "new Date(''$(<SOURCE_DATE_EPOCH))"
# Workaround for https://github.com/nrwl/nx/issues/22445
faketty npm run build:production
cp -r node_modules dist/apps/api/
cp -r prisma dist/apps/api/
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/node_modules/ghostfolio"
cp -r dist/apps/{api,client} "$out/lib/node_modules/ghostfolio/"
mkdir "$out/bin"
makeWrapper ${lib.getExe nodejs} "$out/bin/ghostfolio" \
--add-flags "$out/lib/node_modules/ghostfolio/api/main" "''${user_args[@]}" \
--prefix PATH : ${lib.makeBinPath [ openssl ]} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl ]} \
${lib.concatStringsSep " " (
lib.mapAttrsToList (name: value: "--set ${name} ${lib.escapeShellArg value}") {
PRISMA_SCHEMA_ENGINE_BINARY = lib.getExe' prisma-engines "schema-engine";
PRISMA_QUERY_ENGINE_BINARY = lib.getExe' prisma-engines "query-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${prisma-engines}/lib/libquery_engine.node";
PRISMA_INTROSPECTION_ENGINE_BINARY = lib.getExe' prisma-engines "introspection-engine";
PRISMA_FMT_BINARY = lib.getExe' prisma-engines "prisma-fmt";
}
)}
runHook postInstall
'';
meta = {
description = "Open Source Wealth Management Software";
homepage = "https://github.com/ghostfolio/ghostfolio";
changelog = "https://github.com/ghostfolio/ghostfolio/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "ghostfolio";
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
sqlite,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "ghostie";
version = "0.3.1";
src = fetchFromGitHub {
owner = "attriaayush";
repo = "ghostie";
rev = "v${version}";
sha256 = "sha256-lEjJLmBA3dlIVxc8E+UvR7u154QGeCfEbxdgUxAS3Cw=";
};
cargoHash = "sha256-nGib7MXLiN5PTQoSFf68ClwX5K/aSF8QT9hz20UDGdE=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
sqlite
];
# 4 out of 5 tests are notification tests which do not work in nix builds
doCheck = false;
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
export HOME=$(mktemp -d)
'';
meta = {
description = "Github notifications in your terminal";
homepage = "https://github.com/attriaayush/ghostie";
changelog = "https://github.com/attriaayush/ghostie/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ matthiasbeyer ];
broken = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin;
mainProgram = "ghostie";
};
}

View File

@@ -0,0 +1,7 @@
Kill the reference from libgc.so to the documentation directory.
It's bad for closure, and probably not really good for anything.
--- a/base/gs.mak
+++ b/base/gs.mak
@@ -538,1 +538,1 @@
- $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 $(GS_DOCDIR) -x 22
+ $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 /no-path-to-docs -x 22

View File

@@ -0,0 +1,253 @@
{
config,
stdenv,
lib,
fetchurl,
fetchpatch2,
pkg-config,
zlib,
expat,
openssl,
autoconf,
libjpeg,
libpng,
libtiff,
freetype,
fontconfig,
libpaper,
jbig2dec,
libiconv,
ijs,
lcms2,
callPackage,
bash,
buildPackages,
openjpeg,
fixDarwinDylibNames,
cupsSupport ? config.ghostscript.cups or (!stdenv.hostPlatform.isDarwin),
cups,
x11Support ? cupsSupport,
xorg, # with CUPS, X11 only adds very little
dynamicDrivers ? true,
# for passthru.tests
graphicsmagick,
imagemagick,
libspectre,
lilypond,
pstoedit,
python3,
}:
let
fonts = stdenv.mkDerivation {
name = "ghostscript-fonts";
srcs = [
(fetchurl {
url = "mirror://sourceforge/gs-fonts/ghostscript-fonts-std-8.11.tar.gz";
hash = "sha256-DrbzVhGfLkmyVjIQhS4X9X+dzFdV81Cmmkag1kGgxAE=";
})
(fetchurl {
url = "mirror://gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz";
hash = "sha256-gUbMzEaZ/p2rhBRGvdFwOfR2nJA+zrVECRiLkgdUqrM=";
})
# ... add other fonts here
];
installPhase = ''
mkdir "$out"
mv -v * "$out/"
'';
};
in
stdenv.mkDerivation rec {
pname = "ghostscript${lib.optionalString x11Support "-with-X"}";
version = "10.06.0";
src = fetchurl {
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${
lib.replaceStrings [ "." ] [ "" ] version
}/ghostscript-${version}.tar.xz";
hash = "sha256-ZDUmSMLAgcip+xoS3Bll4B6tfFf1i3LRtU9u8c7zxWE=";
};
patches = [
./urw-font-files.patch
./doc-no-ref.diff
# Support SOURCE_DATE_EPOCH for reproducible builds
(fetchpatch2 {
url = "https://salsa.debian.org/debian/ghostscript/-/raw/01e895fea033cc35054d1b68010de9818fa4a8fc/debian/patches/2010_add_build_timestamp_setting.patch";
hash = "sha256-XTKkFKzMR2QpcS1YqoxzJnyuGk/l/Y2jdevsmbMtCXA=";
})
]
++ lib.optionals stdenv.hostPlatform.is32bit [
# 32 bit compat. conditional as to not cause rebuilds
(fetchpatch2 {
url = "https://github.com/ArtifexSoftware/ghostpdl/commit/3c0be6e4fcffa63e4a5a1b0aec057cebc4d2562f.patch?full_index=1";
hash = "sha256-NrL4lI19x+OHaSIwV93Op/I9k2MWXxSWgbkwSGU7R6A=";
})
];
outputs = [
"out"
"man"
"doc"
"fonts"
];
enableParallelBuilding = true;
depsBuildBuild = [
buildPackages.stdenv.cc
];
nativeBuildInputs = [
pkg-config
autoconf
zlib
]
++ lib.optional cupsSupport cups
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [
zlib
expat
openssl
libjpeg
libpng
libtiff
freetype
fontconfig
libpaper
jbig2dec
libiconv
ijs
lcms2
bash
openjpeg
]
++ lib.optionals x11Support [
xorg.libICE
xorg.libX11
xorg.libXext
xorg.libXt
]
++ lib.optional cupsSupport cups;
preConfigure = ''
# https://ghostscript.com/doc/current/Make.htm
export CCAUX=$CC_FOR_BUILD
${lib.optionalString cupsSupport ''export CUPSCONFIG="${cups.dev}/bin/cups-config"''}
rm -rf jpeg libpng zlib jasper expat tiff lcms2mt jbig2dec freetype cups/libs ijs openjpeg
sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak
sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac
# Sidestep a bug in autoconf-2.69 that sets the compiler for all checks to
# $CXX after the part for the vendored copy of tesseract.
# `--without-tesseract` is already passed to the outer ./configure, here we
# make sure it is also passed to its recursive invocation for buildPlatform
# checks when cross-compiling.
substituteInPlace configure.ac \
--replace-fail "--without-x" "--without-x --without-tesseract"
autoconf
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
export DARWIN_LDFLAGS_SO_PREFIX=$out/lib/
'';
configureFlags = [
"--with-system-libtiff"
"--without-tesseract"
]
++ lib.optionals dynamicDrivers [
"--enable-dynamic"
"--disable-hidden-visibility"
]
++ lib.optionals x11Support [
"--with-x"
]
++ lib.optionals cupsSupport [
"--enable-cups"
];
# make check does nothing useful
doCheck = false;
# don't build/install statically linked bin/gs
buildFlags = [
"so"
]
# without -headerpad, the following error occurs on Darwin when compiling with X11 support (as of 10.02.0)
# error: install_name_tool: changing install names or rpaths can't be redone for: [...]libgs.dylib.10 (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
++ lib.optional (x11Support && stdenv.hostPlatform.isDarwin) "LDFLAGS=-headerpad_max_install_names";
installTargets = [ "soinstall" ];
postInstall = ''
ln -s gsc "$out"/bin/gs
cp -r Resource "$out/share/ghostscript/${version}"
mkdir -p $fonts/share/fonts
cp -rv ${fonts}/* "$fonts/share/fonts/"
ln -s "$fonts/share/fonts" "$out/share/ghostscript/fonts"
'';
# validate dynamic linkage
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/gs --version
$out/bin/gsx --version
pushd examples
for f in *.{ps,eps,pdf}; do
echo "Rendering $f"
$out/bin/gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=bitcmyk \
-sOutputFile=/dev/null \
-r600 \
-dBufferSpace=100000 \
$f
done
popd # examples
runHook postInstallCheck
'';
passthru.tests = {
test-corpus-render = callPackage ./test-corpus-render.nix { };
inherit
graphicsmagick
imagemagick
libspectre
lilypond
pstoedit
;
inherit (python3.pkgs) matplotlib;
};
meta = {
homepage = "https://www.ghostscript.com/";
description = "PostScript interpreter (mainline version)";
longDescription = ''
Ghostscript is the name of a set of tools that provides (i) an
interpreter for the PostScript language and the PDF file format,
(ii) a set of C procedures (the Ghostscript library) that
implement the graphics capabilities that appear as primitive
operations in the PostScript language, and (iii) a wide variety
of output drivers for various file formats and printers.
'';
license = lib.licenses.agpl3Plus;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.tobim ];
mainProgram = "gs";
};
}

View File

@@ -0,0 +1,38 @@
{
stdenv,
fetchgit,
ghostscript,
}:
stdenv.mkDerivation {
pname = "ghostscript-test-corpus-render";
version = "unstable-2023-05-19";
src = fetchgit {
url = "git://git.ghostscript.com/tests.git";
rev = "f7d5087d3d6c236707842dcd428818c6cb8fb041";
hash = "sha256-xHOEo1ZJG1GCcEKqaXLDpfRRQxpbSy0bzicKju9hG40=";
};
dontConfigure = true;
dontBuild = true;
doCheck = true;
checkPhase = ''
find . -iregex '.*\.\(ps\|eps\|pdf\)' | while read f; do
echo "Rendering $f"
${ghostscript}/bin/gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=bitcmyk \
-sOutputFile=/dev/null \
-r600 \
-dBufferSpace=100000 \
$f
done
'';
installPhase = ''
touch $out
'';
}

View File

@@ -0,0 +1,61 @@
Sometime between 8.62 and 8.64, the fontmap file was changed such that the
`.pfb' files of the URW++ fonts no longer appear in 8.64, making it impossible
to display/render these fonts.
--- gnu-ghostscript-8.64/Resource/Init/Fontmap.GS 2009-05-27 02:19:02.000000000 +0200
+++ gnu-ghostscript-8.62/Resource/Init/Fontmap.GS 2009-05-27 02:19:09.000000000 +0200
@@ -81,6 +81,54 @@
% Copyright URW Software, Copyright 1994 by URW.
%
+% Actual fonts
+
+/URWBookmanL-DemiBold (b018015l.pfb) ;
+/URWBookmanL-DemiBoldItal (b018035l.pfb) ;
+/URWBookmanL-Ligh (b018012l.pfb) ;
+/URWBookmanL-LighItal (b018032l.pfb) ;
+
+/NimbusMonL-Regu (n022003l.pfb) ;
+/NimbusMonL-ReguObli (n022023l.pfb) ;
+/NimbusMonL-Bold (n022004l.pfb) ;
+/NimbusMonL-BoldObli (n022024l.pfb) ;
+
+/URWGothicL-Book (a010013l.pfb) ;
+/URWGothicL-BookObli (a010033l.pfb) ;
+/URWGothicL-Demi (a010015l.pfb) ;
+/URWGothicL-DemiObli (a010035l.pfb) ;
+
+/NimbusSanL-Regu (n019003l.pfb) ;
+/NimbusSanL-ReguItal (n019023l.pfb) ;
+/NimbusSanL-Bold (n019004l.pfb) ;
+/NimbusSanL-BoldItal (n019024l.pfb) ;
+
+/NimbusSanL-ReguCond (n019043l.pfb) ;
+/NimbusSanL-ReguCondItal (n019063l.pfb) ;
+/NimbusSanL-BoldCond (n019044l.pfb) ;
+/NimbusSanL-BoldCondItal (n019064l.pfb) ;
+
+/URWPalladioL-Roma (p052003l.pfb) ;
+/URWPalladioL-Ital (p052023l.pfb) ;
+/URWPalladioL-Bold (p052004l.pfb) ;
+/URWPalladioL-BoldItal (p052024l.pfb) ;
+
+/CenturySchL-Roma (c059013l.pfb) ;
+/CenturySchL-Ital (c059033l.pfb) ;
+/CenturySchL-Bold (c059016l.pfb) ;
+/CenturySchL-BoldItal (c059036l.pfb) ;
+
+/NimbusRomNo9L-Regu (n021003l.pfb) ;
+/NimbusRomNo9L-ReguItal (n021023l.pfb) ;
+/NimbusRomNo9L-Medi (n021004l.pfb) ;
+/NimbusRomNo9L-MediItal (n021024l.pfb) ;
+
+/StandardSymL (s050000l.pfb) ;
+
+/URWChanceryL-MediItal (z003034l.pfb) ;
+
+/Dingbats (d050000l.pfb) ;
+
% Aliases
/Bookman-Demi /URWBookmanL-DemiBold ;

View File

@@ -0,0 +1,8 @@
{
ghostscript,
}:
ghostscript.override {
cupsSupport = true;
x11Support = true;
}

View File

@@ -0,0 +1,8 @@
{
ghostscript,
}:
ghostscript.override {
cupsSupport = false;
x11Support = false;
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "ghosttohugo";
version = "0.5.3";
src = fetchFromGitHub {
owner = "jbarone";
repo = "ghostToHugo";
rev = "v${version}";
hash = "sha256-lYqjwLPvSX9/HaFvSwtkvxbCToTwfDPeVivNfazZwQA=";
};
vendorHash = "sha256-/7MsVLVek2nQwf8rVJQywBKiIOCGe72L45CkAElXrMo=";
meta = with lib; {
description = "Convert Ghost export to Hugo posts";
homepage = "https://github.com/jbarone/ghostToHugo";
license = licenses.mit;
maintainers = with maintainers; [ clerie ];
mainProgram = "ghostToHugo";
};
}

View File

@@ -0,0 +1,116 @@
{
lib,
stdenvNoCC,
_7zz,
fetchurl,
makeBinaryWrapper,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ghostty-bin";
version = "1.2.2";
src = fetchurl {
url = "https://release.files.ghostty.org/${finalAttrs.version}/Ghostty.dmg";
hash = "sha256-gSuOOWZUzKKihCGmqEnieJJ8iP4xFeoSQIL536ka454=";
};
sourceRoot = ".";
# otherwise fails to unpack with:
# ERROR: Dangerous link path was ignored : Ghostty.app/Contents/Resources/terminfo/67/ghostty : ../78/xterm-ghostty
unpackPhase = lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
runHook preUnpack
7zz -snld x $src
runHook postUnpack
'';
nativeBuildInputs = [
_7zz
makeBinaryWrapper
];
postInstall = ''
mkdir -p $out/Applications
mv Ghostty.app $out/Applications/
makeWrapper $out/Applications/Ghostty.app/Contents/MacOS/ghostty $out/bin/ghostty
'';
/**
Ghostty really likes all of it's resources to be in the same directory, so link them back after we split them
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/os/resourcesdir.zig#L11-L52
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/termio/Exec.zig#L745-L750
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/termio/Exec.zig#L818-L834
terminfo and shell integration should also be installable on remote machines
```nix
{ pkgs, ... }: {
environment.systemPackages = [ pkgs.ghostty.terminfo ];
programs.bash = {
interactiveShellInit = ''
if [[ "$TERM" == "xterm-ghostty" ]]; then
builtin source ${pkgs.ghostty.shell_integration}/bash/ghostty.bash
fi
'';
};
}
```
On linux we can move the original files and make symlinks to them
but on darwin (when using the .app bundle) we need to copy the files
in order to maintain signed integrity
*/
resourceDir = "${placeholder "out"}/Applications/Ghostty.app/Contents/Resources";
postFixup = ''
mkdir -p $terminfo/share
cp -r $resourceDir/terminfo $terminfo/share/terminfo
cp -r $resourceDir/ghostty/shell-integration $shell_integration
cp -r $resourceDir/vim/vimfiles $vim
'';
# Usually the multiple-outputs hook would take care of this, but
# our manpages are in the .app bundle
preFixup = ''
mkdir -p $man/share
cp -r $resourceDir/man $man/share/man
'';
outputs = [
"out"
"man"
"shell_integration"
"terminfo"
"vim"
];
meta = {
description = "Fast, native, feature-rich terminal emulator pushing modern features";
longDescription = ''
Ghostty is a terminal emulator that differentiates itself by being
fast, feature-rich, and native. While there are many excellent terminal
emulators available, they all force you to choose between speed,
features, or native UIs. Ghostty provides all three.
'';
homepage = "https://ghostty.org/";
downloadPage = "https://ghostty.org/download";
changelog = "https://ghostty.org/docs/install/release-notes/${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Enzime ];
mainProgram = "ghostty";
outputsToInstall = [
"out"
"man"
"shell_integration"
"terminfo"
];
platforms = lib.platforms.darwin;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
})

371
pkgs/by-name/gh/ghostty/deps.nix generated Normal file
View File

@@ -0,0 +1,371 @@
# generated by zon2nix (https://github.com/jcollie/zon2nix)
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig_0_14,
name ? "zig-packages",
}:
let
unpackZigArtifact =
{
name,
artifact,
}:
runCommandLocal name
{
nativeBuildInputs = [ zig_0_14 ];
}
''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = lib.splitString "#" url;
url_base = builtins.elemAt parts 0;
url_without_query = builtins.elemAt (lib.splitString "?" url_base) 0;
rev_base = builtins.elemAt parts 1;
rev =
if builtins.match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}";
in
fetchgit {
inherit name rev hash;
url = url_without_query;
deepClone = false;
fetchSubmodules = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = lib.splitString "://" url;
proto = builtins.elemAt parts 0;
path = builtins.elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
};
in
fetcher.${proto};
in
linkFarm name [
{
name = "N-V-__8AALw2uwF_03u4JRkZwRLc3Y9hakkYV7NKRR9-RIZJ";
path = fetchZigArtifact {
name = "breakpad";
url = "https://deps.files.ghostty.org/breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918.tar.gz";
hash = "sha256-bMqYlD0amQdmzvYQd8Ca/1k4Bj/heh7+EijlQSttatk=";
};
}
{
name = "N-V-__8AAIrfdwARSa-zMmxWwFuwpXf1T3asIN7s5jqi9c1v";
path = fetchZigArtifact {
name = "fontconfig";
url = "https://deps.files.ghostty.org/fontconfig-2.14.2.tar.gz";
hash = "sha256-O6LdkhWHGKzsXKrxpxYEO1qgVcJ7CB2RSvPMtA3OilU=";
};
}
{
name = "N-V-__8AAKLKpwC4H27Ps_0iL3bPkQb-z6ZVSrB-x_3EEkub";
path = fetchZigArtifact {
name = "freetype";
url = "https://deps.files.ghostty.org/freetype-1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d.tar.gz";
hash = "sha256-QnIB9dUVFnDQXB9bRb713aHy592XHvVPD+qqf/0quQw=";
};
}
{
name = "N-V-__8AADcZkgn4cMhTUpIz6mShCKyqqB-NBtf_S2bHaTC-";
path = fetchZigArtifact {
name = "gettext";
url = "https://deps.files.ghostty.org/gettext-0.24.tar.gz";
hash = "sha256-yRhQPVk9cNr0hE0XWhPYFq+stmfAb7oeydzVACwVGLc=";
};
}
{
name = "N-V-__8AABzkUgISeKGgXAzgtutgJsZc0-kkeqBBscJgMkvy";
path = fetchZigArtifact {
name = "glslang";
url = "https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz";
hash = "sha256-FKLtu1Ccs+UamlPj9eQ12/WXFgS0uDPmPmB26MCpl7U=";
};
}
{
name = "gobject-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z";
path = fetchZigArtifact {
name = "gobject";
url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst";
hash = "sha256-h6aKUerGlX2ATVEeoN03eWaqDqvUmKdedgpxrSoHvrY=";
};
}
{
name = "N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr";
path = fetchZigArtifact {
name = "gtk4_layer_shell";
url = "https://deps.files.ghostty.org/gtk4-layer-shell-1.1.0.tar.gz";
hash = "sha256-mChCgSYKXu9bT2OlXxbEv2p4ihAgptsDfssPcfozaYg=";
};
}
{
name = "N-V-__8AAG02ugUcWec-Ndp-i7JTsJ0dgF8nnJRUInkGLG7G";
path = fetchZigArtifact {
name = "harfbuzz";
url = "https://deps.files.ghostty.org/harfbuzz-11.0.0.tar.xz";
hash = "sha256-8WNRuv4hRyX+LB1bWfDZPkmQWkskeJn7kNcM/5U6K5s=";
};
}
{
name = "N-V-__8AAGmZhABbsPJLfbqrh6JTHsXhY6qCaLAQyx25e0XE";
path = fetchZigArtifact {
name = "highway";
url = "https://deps.files.ghostty.org/highway-66486a10623fa0d72fe91260f96c892e41aceb06.tar.gz";
hash = "sha256-h9T4iT704I8iSXNgj/6/lCaKgTgLp5wS6IQZaMgKohI=";
};
}
{
name = "N-V-__8AAH0GaQC8a52s6vfIxg88OZgFgEW6DFxfSK4lX_l3";
path = fetchZigArtifact {
name = "imgui";
url = "https://deps.files.ghostty.org/imgui-1220bc6b9daceaf7c8c60f3c3998058045ba0c5c5f48ae255ff97776d9cd8bfc6402.tar.gz";
hash = "sha256-oF/QHgTPEat4Hig4fGIdLkIPHmBEyOJ6JeYD6pnveGA=";
};
}
{
name = "N-V-__8AALIsAwDyo88G5mGJGN2lSVmmFMx4YePfUvp_2o3Y";
path = fetchZigArtifact {
name = "iterm2_themes";
url = "https://github.com/mbadolato/iTerm2-Color-Schemes/releases/download/release-20251002-142451-4a5043e/ghostty-themes.tgz";
hash = "sha256-GsEWVt4wMzp6+7N5I+QVuhCVJ70cFrdADwUds59AKnw=";
};
}
{
name = "N-V-__8AAIC5lwAVPJJzxnCAahSvZTIlG-HhtOvnM1uh-66x";
path = fetchZigArtifact {
name = "jetbrains_mono";
url = "https://deps.files.ghostty.org/JetBrainsMono-2.304.tar.gz";
hash = "sha256-xXppHouCrQmLWWPzlZAy5AOPORCHr3cViFulkEYQXMQ=";
};
}
{
name = "N-V-__8AAJrvXQCqAT8Mg9o_tk6m0yf5Fz-gCNEOKLyTSerD";
path = fetchZigArtifact {
name = "libpng";
url = "https://deps.files.ghostty.org/libpng-1220aa013f0c83da3fb64ea6d327f9173fa008d10e28bc9349eac3463457723b1c66.tar.gz";
hash = "sha256-/syVtGzwXo4/yKQUdQ4LparQDYnp/fF16U/wQcrxoDo=";
};
}
{
name = "libxev-0.0.0-86vtc2UaEwDfiTKX3iBI-s_hdzfzWQUarT3MUrmUQl-Q";
path = fetchZigArtifact {
name = "libxev";
url = "https://github.com/mitchellh/libxev/archive/7f803181b158a10fec8619f793e3b4df515566cb.tar.gz";
hash = "sha256-KaozYKEhhT/6sInef7/8O/60LDBJN+8QmdLuNY1Gkmc=";
};
}
{
name = "N-V-__8AAG3RoQEyRC2Vw7Qoro5SYBf62IHn3HjqtNVY6aWK";
path = fetchZigArtifact {
name = "libxml2";
url = "https://deps.files.ghostty.org/libxml2-2.11.5.tar.gz";
hash = "sha256-bCgFni4+60K1tLFkieORamNGwQladP7jvGXNxdiaYhU=";
};
}
{
name = "N-V-__8AAMVLTABmYkLqhZPLXnMl-KyN38R8UVYqGrxqO26s";
path = fetchZigArtifact {
name = "nerd_fonts_symbols_only";
url = "https://deps.files.ghostty.org/NerdFontsSymbolsOnly-3.4.0.tar.gz";
hash = "sha256-EWTRuVbUveJI17LwmYxDzJT1ICQxoVZKeTiVsec7DQQ=";
};
}
{
name = "N-V-__8AAHjwMQDBXnLq3Q2QhaivE0kE2aD138vtX2Bq1g7c";
path = fetchZigArtifact {
name = "oniguruma";
url = "https://deps.files.ghostty.org/oniguruma-1220c15e72eadd0d9085a8af134904d9a0f5dfcbed5f606ad60edc60ebeccd9706bb.tar.gz";
hash = "sha256-ABqhIC54RI9MC/GkjHblVodrNvFtks4yB+zP1h2Z8qA=";
};
}
{
name = "N-V-__8AADYiAAB_80AWnH1AxXC0tql9thT-R-DYO1gBqTLc";
path = fetchZigArtifact {
name = "pixels";
url = "https://deps.files.ghostty.org/pixels-12207ff340169c7d40c570b4b6a97db614fe47e0d83b5801a932dcd44917424c8806.tar.gz";
hash = "sha256-Veg7FtCRCCUCvxSb9FfzH0IJLFmCZQ4/+657SIcb8Ro=";
};
}
{
name = "N-V-__8AAKYZBAB-CFHBKs3u4JkeiT4BMvyHu3Y5aaWF3Bbs";
path = fetchZigArtifact {
name = "plasma_wayland_protocols";
url = "https://deps.files.ghostty.org/plasma_wayland_protocols-12207e0851c12acdeee0991e893e0132fc87bb763969a585dc16ecca33e88334c566.tar.gz";
hash = "sha256-XFi6IUrNjmvKNCbcCLAixGqN2Zeymhs+KLrfccIN9EE=";
};
}
{
name = "N-V-__8AAPlZGwBEa-gxrcypGBZ2R8Bse4JYSfo_ul8i2jlG";
path = fetchZigArtifact {
name = "sentry";
url = "https://deps.files.ghostty.org/sentry-1220446be831adcca918167647c06c7b825849fa3fba5f22da394667974537a9c77e.tar.gz";
hash = "sha256-KsZJfMjWGo0xCT5HrduMmyxFsWsHBbszSoNbZCPDGN8=";
};
}
{
name = "N-V-__8AANb6pwD7O1WG6L5nvD_rNMvnSc9Cpg1ijSlTYywv";
path = fetchZigArtifact {
name = "spirv_cross";
url = "https://deps.files.ghostty.org/spirv_cross-1220fb3b5586e8be67bc3feb34cbe749cf42a60d628d2953632c2f8141302748c8da.tar.gz";
hash = "sha256-tStvz8Ref6abHwahNiwVVHNETizAmZVVaxVsU7pmV+M=";
};
}
{
name = "N-V-__8AAHffAgDU0YQmynL8K35WzkcnMUmBVQHQ0jlcKpjH";
path = fetchZigArtifact {
name = "utfcpp";
url = "https://deps.files.ghostty.org/utfcpp-1220d4d18426ca72fc2b7e56ce47273149815501d0d2395c2a98c726b31ba931e641.tar.gz";
hash = "sha256-/8ZooxDndgfTk/PBizJxXyI9oerExNbgV5oR345rWc8=";
};
}
{
name = "vaxis-0.1.0-BWNV_FUICQAFZnTCL11TUvnUr1Y0_ZdqtXHhd51d76Rn";
path = fetchZigArtifact {
name = "vaxis";
url = "git+https://github.com/rockorager/libvaxis#1f41c121e8fc153d9ce8c6eb64b2bbab68ad7d23";
hash = "sha256-bNZ3oveT6vPChjimPJ/GGfcdivlAeJdl/xfWM+S/MHY=";
};
}
{
name = "N-V-__8AAKrHGAAs2shYq8UkE6bGcR1QJtLTyOE_lcosMn6t";
path = fetchZigArtifact {
name = "wayland";
url = "https://deps.files.ghostty.org/wayland-9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d.tar.gz";
hash = "sha256-6kGR1o5DdnflHzqs3ieCmBAUTpMdOXoyfcYDXiw5xQ0=";
};
}
{
name = "N-V-__8AAKw-DAAaV8bOAAGqA0-oD7o-HNIlPFYKRXSPT03S";
path = fetchZigArtifact {
name = "wayland_protocols";
url = "https://deps.files.ghostty.org/wayland-protocols-258d8f88f2c8c25a830c6316f87d23ce1a0f12d9.tar.gz";
hash = "sha256-XO3K3egbdeYPI+XoO13SuOtO+5+Peb16NH0UiusFMPg=";
};
}
{
name = "N-V-__8AAAzZywE3s51XfsLbP9eyEw57ae9swYB9aGB6fCMs";
path = fetchZigArtifact {
name = "wuffs";
url = "https://deps.files.ghostty.org/wuffs-122037b39d577ec2db3fd7b2130e7b69ef6cc1807d68607a7c232c958315d381b5cd.tar.gz";
hash = "sha256-nkzSCr6W5sTG7enDBXEIhgEm574uLD41UVR2wlC+HBM=";
};
}
{
name = "z2d-0.8.1-j5P_Hq8vDwB8ZaDA54-SzESDLF2zznG_zvTHiQNJImZP";
path = fetchZigArtifact {
name = "z2d";
url = "https://github.com/vancluever/z2d/archive/refs/tags/v0.8.1.tar.gz";
hash = "sha256-0DbDKSYA1ejhVx/WbOkwTgD57PNRFcnRviqBh8xpPZ0=";
};
}
{
name = "zf-0.10.3-OIRy8aiIAACLrBllz0zjxaH0aOe5oNm3KtEMyCntST-9";
path = fetchZigArtifact {
name = "zf";
url = "https://github.com/natecraddock/zf/archive/7aacbe6d155d64d15937ca95ca6c014905eb531f.tar.gz";
hash = "sha256-3nulNQd/4rZ4paeXJYXwAliNNyRNsIOX/q3z1JB8C7I=";
};
}
{
name = "zg-0.13.4-AAAAAGiZ7QLz4pvECFa_wG4O4TP4FLABHHbemH2KakWM";
path = fetchZigArtifact {
name = "zg";
url = "git+https://codeberg.org/atman/zg#4a002763419a34d61dcbb1f415821b83b9bf8ddc";
hash = "sha256-fo3l6cjkrr/godElTGnQzalBsasN7J73IDIRmw7v1gA=";
};
}
{
name = "N-V-__8AAB9YCQBaZtQjJZVndk-g_GDIK-NTZcIa63bFp9yZ";
path = fetchZigArtifact {
name = "zig_js";
url = "https://deps.files.ghostty.org/zig_js-12205a66d423259567764fa0fc60c82be35365c21aeb76c5a7dc99698401f4f6fefc.tar.gz";
hash = "sha256-fyNeCVbC9UAaKJY6JhAZlT0A479M/AKYMPIWEZbDWD0=";
};
}
{
name = "zig_objc-0.0.0-Ir_SpwsPAQBJgi9YRm2ubJMfdoysSq5gKpsIj3izQ8Zk";
path = fetchZigArtifact {
name = "zig_objc";
url = "https://github.com/mitchellh/zig-objc/archive/c9e917a4e15a983b672ca779c7985d738a2d517c.tar.gz";
hash = "sha256-o3vl7qfkSi0bKXa6JWuF92qMEGP8Af/shcip5nRo5Nw=";
};
}
{
name = "wayland-0.4.0-dev-lQa1kjfIAQCmhhQu3xF0KH-94-TzeMXOqfnP0-Dg6Wyy";
path = fetchZigArtifact {
name = "zig_wayland";
url = "https://codeberg.org/ifreund/zig-wayland/archive/f3c5d503e540ada8cbcb056420de240af0c094f7.tar.gz";
hash = "sha256-E77GZ15APYbbO1WzmuJi8eG9/iQFbc2CgkNBxjCLUhk=";
};
}
{
name = "zigimg-0.1.0-lly-O6N2EABOxke8dqyzCwhtUCAafqP35zC7wsZ4Ddxj";
path = fetchZigArtifact {
name = "zigimg";
url = "git+https://github.com/TUSF/zigimg#31268548fe3276c0e95f318a6c0d2ab10565b58d";
hash = "sha256-oblfr2FIzuqq0FLo/RrzCwUX1NJJuT53EwD3nP3KwN0=";
};
}
{
name = "ziglyph-0.11.2-AAAAAHPtHwB4Mbzn1KvOV7Wpjo82NYEc_v0WC8oCLrkf";
path = fetchZigArtifact {
name = "ziglyph";
url = "https://deps.files.ghostty.org/ziglyph-b89d43d1e3fb01b6074bc1f7fc980324b04d26a5.tar.gz";
hash = "sha256-cse98+Ft8QUjX+P88yyYfaxJOJGQ9M7Ymw7jFxDz89k=";
};
}
{
name = "N-V-__8AAB0eQwD-0MdOEBmz7intriBReIsIDNlukNVoNu6o";
path = fetchZigArtifact {
name = "zlib";
url = "https://deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz";
hash = "sha256-F+iIY/NgBnKrSRgvIXKBtvxNPHYr3jYZNeQ2qVIU0Fw=";
};
}
]

View File

@@ -0,0 +1,190 @@
{
lib,
stdenv,
blueprint-compiler,
bzip2,
callPackage,
fetchFromGitHub,
fontconfig,
freetype,
glib,
glslang,
gtk4-layer-shell,
harfbuzz,
libGL,
libX11,
libadwaita,
ncurses,
nixosTests,
oniguruma,
pandoc,
pkg-config,
removeReferencesTo,
versionCheckHook,
wrapGAppsHook4,
zig_0_14,
# Usually you would override `zig.hook` with this, but we do that internally
# since upstream recommends a non-default level
# https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/PACKAGING.md#build-options
optimizeLevel ? "ReleaseFast",
}:
let
zig = zig_0_14;
zig_hook = zig.hook.overrideAttrs {
zig_default_flags = "-Dcpu=baseline -Doptimize=${optimizeLevel} --color off";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "ghostty";
version = "1.2.2";
outputs = [
"out"
"man"
"shell_integration"
"terminfo"
"vim"
];
src = fetchFromGitHub {
owner = "ghostty-org";
repo = "ghostty";
tag = "v${finalAttrs.version}";
hash = "sha256-BTIH8G1GKrcoMasvlA3fje8f1vZvr4uuAUHfvZq6LVY=";
};
deps = callPackage ./deps.nix {
name = "${finalAttrs.pname}-cache-${finalAttrs.version}";
};
strictDeps = true;
nativeBuildInputs = [
ncurses
pandoc
pkg-config
removeReferencesTo
zig_hook
# GTK frontend
glib # Required for `glib-compile-schemas`
wrapGAppsHook4
blueprint-compiler
];
buildInputs = [
oniguruma
# GTK frontend
libadwaita
libX11
gtk4-layer-shell
# OpenGL renderer
glslang
libGL
# Font backend
bzip2
fontconfig
freetype
harfbuzz
];
zigBuildFlags = [
"--system"
"${finalAttrs.deps}"
"-Dversion-string=${finalAttrs.version}"
]
++ lib.mapAttrsToList (name: package: "-fsys=${name} --search-prefix ${lib.getLib package}") {
inherit glslang;
};
zigCheckFlags = finalAttrs.zigBuildFlags;
doCheck = true;
/**
Ghostty really likes all of it's resources to be in the same directory, so link them back after we split them
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/os/resourcesdir.zig#L11-L52
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/termio/Exec.zig#L745-L750
- https://github.com/ghostty-org/ghostty/blob/4b4d4062dfed7b37424c7210d1230242c709e990/src/termio/Exec.zig#L818-L834
terminfo and shell integration should also be installable on remote machines
```nix
{ pkgs, ... }: {
environment.systemPackages = [ pkgs.ghostty.terminfo ];
programs.bash = {
interactiveShellInit = ''
if [[ "$TERM" == "xterm-ghostty" ]]; then
builtin source ${pkgs.ghostty.shell_integration}/bash/ghostty.bash
fi
'';
};
}
```
*/
postFixup = ''
ln -s $man/share/man $out/share/man
moveToOutput share/terminfo $terminfo
ln -s $terminfo/share/terminfo $out/share/terminfo
mv $out/share/ghostty/shell-integration $shell_integration
ln -s $shell_integration $out/share/ghostty/shell-integration
mv $out/share/vim/vimfiles $vim
rmdir $out/share/vim
ln -s $vim $out/share/vim-plugins
remove-references-to -t ${finalAttrs.deps} $out/bin/.ghostty-wrapped
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
inherit (nixosTests) allTerminfo;
nixos = nixosTests.terminal-emulators.ghostty;
};
updateScript = ./update.nu;
};
meta = {
description = "Fast, native, feature-rich terminal emulator pushing modern features";
longDescription = ''
Ghostty is a terminal emulator that differentiates itself by being
fast, feature-rich, and native. While there are many excellent terminal
emulators available, they all force you to choose between speed,
features, or native UIs. Ghostty provides all three.
'';
homepage = "https://ghostty.org/";
downloadPage = "https://ghostty.org/download";
changelog = "https://ghostty.org/docs/install/release-notes/${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}";
license = lib.licenses.mit;
mainProgram = "ghostty";
maintainers = with lib.maintainers; [
jcollie
pluiedev
getchoo
];
outputsToInstall = [
"out"
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell nixfmt common-updater-scripts
let latest = ^list-git-tags --url=https://github.com/ghostty-org/ghostty
| lines
| sort --natural
| last
| str trim --left --char "v"
let current = ^nix-instantiate --eval -A ghostty.version | str trim -c '"'
if $latest == $current {
print "Up to date!"
exit
}
print $"Updating Ghostty: ($current) -> ($latest)"
^update-source-version ghostty $latest --file=./pkgs/by-name/gh/ghostty/package.nix
# Update deps.nix
http get $"https://raw.githubusercontent.com/ghostty-org/ghostty/refs/tags/v($latest)/build.zig.zon.nix"
| ^nixfmt
| save -f ./pkgs/by-name/gh/ghostty/deps.nix
# In extraordinary cases the DMG might take a while to be notarized by Apple
# and so it's possible for a Git tag to have no corresponding notarized DMG download.
# Don't fail here if that happens.
try {
^update-source-version ghostty-bin $latest --file=./pkgs/by-name/gh/ghostty-bin/package.nix
} catch {
print "Failed to update bin package (is the DMG file uploaded yet?)"
}

View File

@@ -0,0 +1,65 @@
{
stdenv,
buildGoModule,
fetchFromGitHub,
lib,
nixosTests,
ghostunnel,
apple-sdk_12,
darwinMinVersionHook,
writeScript,
runtimeShell,
}:
buildGoModule rec {
pname = "ghostunnel";
version = "1.8.4";
src = fetchFromGitHub {
owner = "ghostunnel";
repo = "ghostunnel";
rev = "v${version}";
hash = "sha256-NnRm1HEdfK6WI5ntilLSwdR2B5czG5CIcMFzl2TzEds=";
};
vendorHash = "sha256-vP8OtjpYNMm1KkNfD3pmNrHh3HRy1GkzUbfLKWKhHbo=";
deleteVendor = true;
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_12
(darwinMinVersionHook "12.0")
];
# These tests don't exist for Linux, and on Darwin they attempt to use the macOS Keychain
# which doesn't work from a nix build. Presumably other platform implementations of the
# certstore would have similar issues, so it probably makes sense to skip them in
# general wherever they are available.
checkFlags = [ "-skip=^Test(ImportDelete|Signer|Certificate)(RSA|ECDSA|EC)$" ];
passthru.tests = {
nixos = nixosTests.ghostunnel;
podman = nixosTests.podman-tls-ghostunnel;
};
passthru.services.default = {
imports = [
(lib.modules.importApply ./service.nix {
inherit writeScript runtimeShell;
})
];
ghostunnel.package = ghostunnel; # FIXME: finalAttrs.finalPackage
};
meta = {
description = "TLS proxy with mutual authentication support for securing non-TLS backend applications";
homepage = "https://github.com/ghostunnel/ghostunnel#readme";
changelog = "https://github.com/ghostunnel/ghostunnel/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
roberth
mjm
];
mainProgram = "ghostunnel";
};
}

View File

@@ -0,0 +1,246 @@
# Non-module dependencies (`importApply`)
{ writeScript, runtimeShell }:
# Service module
{
lib,
config,
options,
...
}:
let
inherit (lib)
concatStringsSep
getExe
mkDefault
mkIf
mkOption
optional
types
;
cfg = config.ghostunnel;
in
{
# https://nixos.org/manual/nixos/unstable/#modular-services
_class = "service";
options = {
ghostunnel = {
package = mkOption {
description = "Package to use for ghostunnel";
defaultText = "The ghostunnel package that provided this module.";
type = types.package;
};
listen = mkOption {
description = ''
Address and port to listen on (can be HOST:PORT, unix:PATH).
'';
type = types.str;
};
target = mkOption {
description = ''
Address to forward connections to (can be HOST:PORT or unix:PATH).
'';
type = types.str;
};
keystore = mkOption {
description = ''
Path to keystore (combined PEM with cert/key, or PKCS12 keystore).
NB: storepass is not supported because it would expose credentials via `/proc/*/cmdline`.
Specify this or `cert` and `key`.
'';
type = types.nullOr types.str;
default = null;
};
cert = mkOption {
description = ''
Path to certificate (PEM with certificate chain).
Not required if `keystore` is set.
'';
type = types.nullOr types.str;
default = null;
};
key = mkOption {
description = ''
Path to certificate private key (PEM with private key).
Not required if `keystore` is set.
'';
type = types.nullOr types.str;
default = null;
};
cacert = mkOption {
description = ''
Path to CA bundle file (PEM/X509). Uses system trust store if `null`.
'';
type = types.nullOr types.str;
};
disableAuthentication = mkOption {
description = ''
Disable client authentication, no client certificate will be required.
'';
type = types.bool;
default = false;
};
allowAll = mkOption {
description = ''
If true, allow all clients, do not check client cert subject.
'';
type = types.bool;
default = false;
};
allowCN = mkOption {
description = ''
Allow client if common name appears in the list.
'';
type = types.listOf types.str;
default = [ ];
};
allowOU = mkOption {
description = ''
Allow client if organizational unit name appears in the list.
'';
type = types.listOf types.str;
default = [ ];
};
allowDNS = mkOption {
description = ''
Allow client if DNS subject alternative name appears in the list.
'';
type = types.listOf types.str;
default = [ ];
};
allowURI = mkOption {
description = ''
Allow client if URI subject alternative name appears in the list.
'';
type = types.listOf types.str;
default = [ ];
};
extraArguments = mkOption {
description = "Extra arguments to pass to `ghostunnel server`";
type = types.listOf types.str;
default = [ ];
};
unsafeTarget = mkOption {
description = ''
If set, does not limit target to localhost, 127.0.0.1, [::1], or UNIX sockets.
This is meant to protect against accidental unencrypted traffic on
untrusted networks.
'';
type = types.bool;
default = false;
};
};
};
config = {
assertions = [
{
message = ''
At least one access control flag is required.
Set at least one of:
- ${options.ghostunnel.disableAuthentication}
- ${options.ghostunnel.allowAll}
- ${options.ghostunnel.allowCN}
- ${options.ghostunnel.allowOU}
- ${options.ghostunnel.allowDNS}
- ${options.ghostunnel.allowURI}
'';
assertion =
cfg.disableAuthentication
|| cfg.allowAll
|| cfg.allowCN != [ ]
|| cfg.allowOU != [ ]
|| cfg.allowDNS != [ ]
|| cfg.allowURI != [ ];
}
];
ghostunnel = {
# Clients should not be authenticated with the public root certificates
# (afaict, it doesn't make sense), so we only provide that default when
# client cert auth is disabled.
cacert = mkIf cfg.disableAuthentication (mkDefault null);
};
# TODO assertions
process = {
argv =
# Use a shell if credentials need to be pulled from the environment.
optional
(builtins.any (v: v != null) [
cfg.keystore
cfg.cert
cfg.key
cfg.cacert
])
(
writeScript "load-credentials" ''
#!${runtimeShell}
exec $@ ${
concatStringsSep " " (
optional (cfg.keystore != null) "--keystore=$CREDENTIALS_DIRECTORY/keystore"
++ optional (cfg.cert != null) "--cert=$CREDENTIALS_DIRECTORY/cert"
++ optional (cfg.key != null) "--key=$CREDENTIALS_DIRECTORY/key"
++ optional (cfg.cacert != null) "--cacert=$CREDENTIALS_DIRECTORY/cacert"
)
}
''
)
++ [
(getExe cfg.package)
"server"
"--listen"
cfg.listen
"--target"
cfg.target
]
++ optional cfg.allowAll "--allow-all"
++ map (v: "--allow-cn=${v}") cfg.allowCN
++ map (v: "--allow-ou=${v}") cfg.allowOU
++ map (v: "--allow-dns=${v}") cfg.allowDNS
++ map (v: "--allow-uri=${v}") cfg.allowURI
++ optional cfg.disableAuthentication "--disable-authentication"
++ optional cfg.unsafeTarget "--unsafe-target"
++ cfg.extraArguments;
};
}
// lib.optionalAttrs (options ? systemd) {
# refine the service
systemd.service = {
after = [ "network.target" ];
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Restart = "always";
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
DynamicUser = true;
LoadCredential =
optional (cfg.keystore != null) "keystore:${cfg.keystore}"
++ optional (cfg.cert != null) "cert:${cfg.cert}"
++ optional (cfg.key != null) "key:${cfg.key}"
++ optional (cfg.cacert != null) "cacert:${cfg.cacert}";
};
};
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
nix-update-script,
ghq,
}:
buildGoModule rec {
pname = "ghq";
version = "1.8.0";
src = fetchFromGitHub {
owner = "x-motemen";
repo = "ghq";
tag = "v${version}";
sha256 = "sha256-5BN96/RShfJpkfpJe0qrZVDuyFoAV9kgCiBv4REY/5Y=";
};
vendorHash = "sha256-jP2Ne/EhmE3tACY1+lHucgBt3VnT4gaQisE3/gVM5Ec=";
doCheck = false;
ldflags = [
"-X=main.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion \
--bash $src/misc/bash/_ghq \
--fish $src/misc/fish/ghq.fish \
--zsh $src/misc/zsh/_ghq
'';
passthru = {
tests.version = testers.testVersion {
package = ghq;
};
updateScript = nix-update-script { };
};
meta = {
description = "Remote repository management made easy";
homepage = "https://github.com/x-motemen/ghq";
maintainers = with lib.maintainers; [ sigma ];
license = lib.licenses.mit;
mainProgram = "ghq";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
ghr,
}:
buildGoModule rec {
pname = "ghr";
version = "0.17.0";
src = fetchFromGitHub {
owner = "tcnksm";
repo = "ghr";
rev = "v${version}";
sha256 = "sha256-Is0D8tElv86s++NV6upu8RXvce65uPWQGIOl0Ftxf/M=";
};
vendorHash = "sha256-gVDZgV7EF4LrCDX25tGpECecLi8IgstpzCOGfJ5+rhA=";
# Tests require a Github API token, and networking
doCheck = false;
doInstallCheck = true;
passthru.tests.version = testers.testVersion {
package = ghr;
version = "v${version}";
};
meta = with lib; {
homepage = "https://github.com/tcnksm/ghr";
description = "Upload multiple artifacts to GitHub Release in parallel";
license = licenses.mit;
maintainers = [ ];
mainProgram = "ghr";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication {
pname = "ghstack";
version = "0.12.0";
pyproject = true;
src = fetchFromGitHub {
owner = "ezyang";
repo = "ghstack";
rev = "fa7e7023d798aad6b115b88c5ad67ce88a4fc2a6";
hash = "sha256-Ywwjeupa8eE/vkrbl5SIbvQs53xaLnq9ieWRFwzmuuc=";
};
build-system = [ python3.pkgs.poetry-core ];
dependencies = with python3.pkgs; [
aiohttp
click
flake8
importlib-metadata
requests
typing-extensions
];
pythonImportsCheck = [ "ghstack" ];
meta = {
description = "Submit stacked diffs to GitHub on the command line";
homepage = "https://github.com/ezyang/ghstack";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ munksgaard ];
mainProgram = "ghstack";
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ghunt";
version = "2.3.3";
pyproject = true;
src = fetchFromGitHub {
owner = "mxrch";
repo = "ghunt";
# The newer releases aren't git-tagged to we just take the
# commit with the version bump
rev = "5782248bfd92a24875e112ed0a83e6986d4c70d0";
hash = "sha256-SQk/hy4r9LIffsu3kxLTv5LCcEvcZkP2jhmPA6Fzo8U=";
};
pythonRelaxDeps = true;
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs =
with python3.pkgs;
[
alive-progress
autoslot
beautifulsoup4
beautifultable
dnspython
geopy
httpx
humanize
imagehash
inflection
jsonpickle
pillow
protobuf
python-dateutil
rich
rich-argparse
packaging
]
++ httpx.optional-dependencies.http2;
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"ghunt"
];
meta = {
description = "Offensive Google framework";
mainProgram = "ghunt";
homepage = "https://github.com/mxrch/ghunt";
changelog = "https://github.com/mxrch/GHunt/releases/tag/v${version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
ghz,
}:
buildGoModule rec {
pname = "ghz";
version = "0.120.0";
src = fetchFromGitHub {
owner = "bojand";
repo = "ghz";
rev = "v${version}";
sha256 = "sha256-EzyQbMoR4veHbc9VaNfiXMi18wXbTbDPfDxo5NCk7CE=";
};
vendorHash = "sha256-7TrYWmVKxHKVTyiIak7tRYKE4hgG/4zfsM76bJRxnAk=";
subPackages = [
"cmd/ghz"
"cmd/ghz-web"
];
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
];
passthru.tests = {
version = testers.testVersion {
package = ghz;
};
web-version = testers.testVersion {
package = ghz;
command = "ghz-web -v";
};
};
meta = with lib; {
description = "Simple gRPC benchmarking and load testing tool";
homepage = "https://ghz.sh";
license = licenses.asl20;
};
}