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
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "ddev";
|
|
version = "1.24.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ddev";
|
|
repo = "ddev";
|
|
rev = "v${version}";
|
|
hash = "sha256-z0rxRY/Jxo+0aLj1vfODBVlmZYb3SOufctS7R9d/3gs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
vendorHash = null;
|
|
|
|
ldflags = [
|
|
"-extldflags -static"
|
|
"-X github.com/ddev/ddev/pkg/versionconstants.DdevVersion=v${version}"
|
|
"-X github.com/ddev/ddev/pkg/versionconstants.SegmentKey=v${version}"
|
|
];
|
|
|
|
# Tests need docker.
|
|
doCheck = false;
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
# DDEV will try to create $HOME/.ddev, so we set $HOME to a temporary
|
|
# directory.
|
|
export HOME=$(mktemp -d)
|
|
$out/bin/ddev_gen_autocomplete
|
|
installShellCompletion --cmd ddev \
|
|
--bash .gotmp/bin/completions/ddev_bash_completion.sh \
|
|
--fish .gotmp/bin/completions/ddev_fish_completion.sh \
|
|
--zsh .gotmp/bin/completions/ddev_zsh_completion.sh
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
versionCheckProgramArg = "--version";
|
|
versionCheckKeepEnvironment = [ "HOME" ];
|
|
|
|
meta = with lib; {
|
|
description = "Docker-based local PHP+Node.js web development environments";
|
|
homepage = "https://ddev.com/";
|
|
license = licenses.asl20;
|
|
platforms = platforms.unix;
|
|
mainProgram = "ddev";
|
|
maintainers = with maintainers; [ remyvv ];
|
|
};
|
|
}
|