|
1 |
| -{ installShellFiles, pkgs, stdenv }: |
2 |
| - |
| 1 | +# This file was generated by GoReleaser. DO NOT EDIT. |
| 2 | +# vim: set ft=nix ts=2 sw=2 sts=2 et sta |
| 3 | +{ |
| 4 | +system ? builtins.currentSystem |
| 5 | +, lib |
| 6 | +, fetchurl |
| 7 | +, installShellFiles |
| 8 | +, stdenvNoCC |
| 9 | +}: |
3 | 10 | let
|
4 |
| - pname = "container-use"; |
5 |
| - version = "0.3.1"; |
6 |
| - |
7 |
| - inherit (stdenv.hostPlatform) system; |
8 |
| - |
9 | 11 | shaMap = {
|
10 |
| - x86_64-linux = "sha256-6OzlbDZJ3ePM174sssaT37d8jg/Oq1pgaTPhOWPpxtI="; |
11 |
| - aarch64-linux = "sha256-JasZtUB1tUu/XsuLWOgjc6xXGBqk7PYz/xx6i7PsQl0="; |
12 |
| - x86_64-darwin = "sha256-tlHK6FsEufxGc/TYhNY5cXSwmlGIDEG+gwJrT9EMNWY="; |
13 |
| - aarch64-darwin = "sha256-ki4xdfkbMHoB5JU9uYNb+bdtAmSPYh+PNdWOPFLerXM="; |
| 12 | + x86_64-linux = "1cdbv7ff0wdknc06avimv107w1b4qziygwbx53zcjsvmxiaa966j"; |
| 13 | + aarch64-linux = "05vclzb8zi81cjphsg4vq01wkdw16jrzw3ws0301gcfhj213i6mc"; |
| 14 | + x86_64-darwin = "152j85ynzyjk57xhbr0grh2afbrrznv5mbwiz696baicmi43z673"; |
| 15 | + aarch64-darwin = "0af5vfn5mxq4krf18zidlwaq0z27xiaj73lv8427nzg1yvc6bm1a"; |
14 | 16 | };
|
15 | 17 |
|
16 | 18 | urlMap = {
|
17 |
| - x86_64-linux = "https://github.com/dagger/container-use/releases/download/v${version}/container-use_v${version}_linux_amd64.tar.gz"; |
18 |
| - aarch64-linux = "https://github.com/dagger/container-use/releases/download/v${version}/container-use_v${version}_linux_arm64.tar.gz"; |
19 |
| - x86_64-darwin = "https://github.com/dagger/container-use/releases/download/v${version}/container-use_v${version}_darwin_amd64.tar.gz"; |
20 |
| - aarch64-darwin = "https://github.com/dagger/container-use/releases/download/v${version}/container-use_v${version}_darwin_arm64.tar.gz"; |
| 19 | + x86_64-linux = "https://github.com/dagger/container-use/releases/download/v0.4.1/container-use_v0.4.1_linux_amd64.tar.gz"; |
| 20 | + aarch64-linux = "https://github.com/dagger/container-use/releases/download/v0.4.1/container-use_v0.4.1_linux_arm64.tar.gz"; |
| 21 | + x86_64-darwin = "https://github.com/dagger/container-use/releases/download/v0.4.1/container-use_v0.4.1_darwin_amd64.tar.gz"; |
| 22 | + aarch64-darwin = "https://github.com/dagger/container-use/releases/download/v0.4.1/container-use_v0.4.1_darwin_arm64.tar.gz"; |
21 | 23 | };
|
22 | 24 | in
|
23 |
| -stdenv.mkDerivation { |
24 |
| - inherit pname version; |
25 |
| - |
26 |
| - src = pkgs.fetchurl { |
27 |
| - url = urlMap.${system} or (throw "unsupported system ${system}"); |
28 |
| - sha256 = shaMap.${system} or (throw "unsupported system ${system}"); |
| 25 | +stdenvNoCC.mkDerivation { |
| 26 | + pname = "container-use"; |
| 27 | + version = "0.4.1"; |
| 28 | + src = fetchurl { |
| 29 | + url = urlMap.${system}; |
| 30 | + sha256 = shaMap.${system}; |
29 | 31 | };
|
30 | 32 |
|
31 | 33 | sourceRoot = ".";
|
32 | 34 |
|
33 | 35 | nativeBuildInputs = [ installShellFiles ];
|
34 | 36 |
|
35 | 37 | installPhase = ''
|
36 |
| - runHook preInstall |
37 |
| -
|
38 |
| - install -Dm755 container-use $out/bin/container-use |
39 |
| -
|
40 |
| - # Create cu symlink for backward compatibility |
41 |
| - ln -s $out/bin/container-use $out/bin/cu |
42 |
| -
|
43 |
| - # Install shell completions |
| 38 | + mkdir -p $out/bin |
| 39 | + cp -vr ./container-use $out/bin/container-use |
| 40 | + ''; |
| 41 | + postInstall = '' |
44 | 42 | installShellCompletion --cmd container-use \
|
45 |
| - --bash completions/container-use.bash \ |
46 |
| - --fish completions/container-use.fish \ |
47 |
| - --zsh completions/container-use.zsh |
48 |
| -
|
| 43 | + --bash <($out/bin/container-use completion bash) \ |
| 44 | + --fish <($out/bin/container-use completion fish) \ |
| 45 | + --zsh <($out/bin/container-use completion zsh) |
| 46 | + # Create cu symlink for backward compatibility |
| 47 | + ln -sf $out/bin/container-use $out/bin/cu |
49 | 48 | # Install cu completions for backward compatibility
|
50 | 49 | installShellCompletion --cmd cu \
|
51 |
| - --bash completions/cu.bash \ |
52 |
| - --fish completions/cu.fish \ |
53 |
| - --zsh completions/cu.zsh |
54 |
| -
|
55 |
| - # Install man pages |
56 |
| - installManPage man/*.1 |
57 |
| -
|
58 |
| - runHook postInstall |
| 50 | + --bash <($out/bin/cu completion bash) \ |
| 51 | + --fish <($out/bin/cu completion fish) \ |
| 52 | + --zsh <($out/bin/cu completion zsh) |
59 | 53 | '';
|
60 | 54 |
|
61 |
| - meta = with pkgs.lib; { |
| 55 | + system = system; |
| 56 | + |
| 57 | + meta = { |
62 | 58 | description = "Containerized environments for coding agents";
|
63 | 59 | homepage = "https://github.com/dagger/container-use";
|
64 |
| - license = licenses.asl20; |
65 |
| - platforms = with platforms; linux ++ darwin; |
66 |
| - mainProgram = "container-use"; |
| 60 | + license = lib.licenses.asl20; |
| 61 | + |
| 62 | + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; |
| 63 | + |
| 64 | + platforms = [ |
| 65 | + "aarch64-darwin" |
| 66 | + "aarch64-linux" |
| 67 | + "x86_64-darwin" |
| 68 | + "x86_64-linux" |
| 69 | + ]; |
67 | 70 | };
|
68 | 71 | }
|
0 commit comments