Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddev: init at 1.21.4 #210579

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6688,6 +6688,12 @@
githubId = 6445082;
name = "Joseph Lukasik";
};
jgonyea = {
email = "jeremy.gonyea@gmail.com";
github = "jgonyea";
githubId = 1057441;
name = "Jeremy Gonyea";
};
jhh = {
email = "jeff@j3ff.io";
github = "jhh";
Expand Down
45 changes: 45 additions & 0 deletions pkgs/applications/virtualization/ddev/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ lib
, bash
, curl
, docker
, docker-compose
, fetchFromGitHub
, git
, go
, pkgs
, stdenv
, testers
, ddev }:


let
pname = "ddev";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use buildGoModule

version = "1.21.6";
in

stdenv.mkDerivation {
name = pname;
version = version;
src = fetchFromGitHub {
owner = "ddev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Wjg0Yxo/ulY6R6hhUMFvNZUSwpXENmAHU7GPbgdw7tw=";
};
Comment on lines +15 to +28
Copy link
Member

@SuperSandro2000 SuperSandro2000 May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let
pname = "ddev";
version = "1.21.6";
in
stdenv.mkDerivation {
name = pname;
version = version;
src = fetchFromGitHub {
owner = "ddev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Wjg0Yxo/ulY6R6hhUMFvNZUSwpXENmAHU7GPbgdw7tw=";
};
stdenv.mkDerivation rec {
pname = "ddev";
version = "1.21.6";
src = fetchFromGitHub {
owner = "ddev";
repo = "ddev";
rev = "v${version}";
sha256 = "sha256-Wjg0Yxo/ulY6R6hhUMFvNZUSwpXENmAHU7GPbgdw7tw=";
};

buildInputs = [ bash curl git go ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please patch that the build requires a git clone. We can replace the values returned by git with dummy values or version.

build flags: SHELL=/nix/store/zlf0f88vj30sc7567b80l52d19pbdmy2-bash-5.2-p15/bin/bash build
fatal: not a git repository (or any of the parent directories): .git
make: *** [Makefile:96: .gotmp/bin/darwin_arm64/mkcert] Error 6

Also please split the packages for cross compilation into nativeBuildInputs and buildInputs.

makeFLags = [ "SHELL=${bash}/bin/bash" ];
buildFlags = ["build"];

passthru.tests.version = testers.testVersion {
package = ddev;
command = "HOME=$(mktemp -d) ddev --version";
version = "v${version}";
};

meta = with lib; {
description = "Docker-based local PHP + Node.js web development environments";
homepage = "https://ddev.readthedocs.io";
license = licenses.asl20;
maintainers = with maintainers; [ jgonyea ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6806,6 +6806,8 @@ with pkgs;

d2 = callPackage ../tools/text/d2 { };

ddev = callPackage ../applications/virtualization/ddev { };

easeprobe = callPackage ../tools/misc/easeprobe { };

emscripten = callPackage ../development/compilers/emscripten {
Expand Down