Skip to content

Commit

Permalink
Upgrading go to new package builder
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Oct 10, 2024
1 parent db6f261 commit 8fbba9b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkgs/modules/docker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ let
replitShimRunc = replit-containerd;
};

mobyGoPackagePath = "github.com/docker/docker";
mobyVersion = "24.0.7+replit";

replit-moby = pkgs.buildGoPackage {
replit-moby = pkgs.buildGoModule {
pname = "replit-moby";
version = mobyVersion;

Expand All @@ -113,7 +112,7 @@ let
sha256 = "sha256-VUgsclXkoHHNT+GgYL7qiCV/4V3P9RZrT9BegMVYaRU=";
};

goPackagePath = mobyGoPackagePath;
vendorHash = null;

nativeBuildInputs = [ pkgs.makeWrapper pkgs.pkg-config pkgs.go pkgs.libtool ];

Expand All @@ -133,7 +132,7 @@ let
buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
# build engine
cd ./go/src/${mobyGoPackagePath}
cd ./go/src
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="v${mobyVersion}"
export VERSION="${mobyVersion}"
Expand All @@ -142,7 +141,7 @@ let
'';

postInstall = ''
cd ./go/src/${mobyGoPackagePath}
cd ./go/src
install -Dm755 ./bundles/dynbinary-daemon/dockerd $out/libexec/docker/replit-dockerd
makeWrapper $out/libexec/docker/replit-dockerd $out/bin/replit-dockerd \
Expand Down

0 comments on commit 8fbba9b

Please sign in to comment.