github.com/goreleaser/goreleaser@v1.25.1/internal/pipe/nix/testdata/TestRunPipe/zip_build.nix.golden (about)

     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  , unzip
    10  }:
    11  let
    12    shaMap = {
    13      i686-linux = "0000000000000000000000000000000000000000000000000000";
    14      x86_64-linux = "0000000000000000000000000000000000000000000000000000";
    15      aarch64-linux = "0000000000000000000000000000000000000000000000000000";
    16      x86_64-darwin = "0000000000000000000000000000000000000000000000000000";
    17      aarch64-darwin = "0000000000000000000000000000000000000000000000000000";
    18    };
    19  
    20    urlMap = {
    21      i686-linux = "https://dummyhost/download/v1.2.1/foo_linux_386.zip";
    22      x86_64-linux = "https://dummyhost/download/v1.2.1/foo_linux_amd64v1.zip";
    23      aarch64-linux = "https://dummyhost/download/v1.2.1/foo_linux_arm64.zip";
    24      x86_64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_amd64v1.zip";
    25      aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip";
    26    };
    27  in
    28  stdenvNoCC.mkDerivation {
    29    pname = "foozip";
    30    version = "1.2.1";
    31    src = fetchurl {
    32      url = urlMap.${system};
    33      sha256 = shaMap.${system};
    34    };
    35  
    36    sourceRoot = ".";
    37  
    38    nativeBuildInputs = [ installShellFiles unzip ];
    39  
    40    installPhase = ''
    41      mkdir -p $out/bin
    42      cp -vr ./foo $out/bin/foo
    43    '';
    44  
    45    system = system;
    46  
    47    meta = {
    48      description = "my test";
    49      homepage = "https://goreleaser.com";
    50      license = lib.licenses.mit;
    51  
    52      sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
    53  
    54      platforms = [
    55        "aarch64-darwin"
    56        "aarch64-linux"
    57        "i686-linux"
    58        "x86_64-darwin"
    59        "x86_64-linux"
    60      ];
    61    };
    62  }