diff --git a/.goreleaser.yml b/.goreleaser.yml index 84b5b53..cebfe12 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,7 +4,7 @@ project_name: wallets includes: - from_url: - url: https://raw.githubusercontent.com/formancehq/earthly/refs/heads/main/.goreleaser.default.yaml + url: https://raw.githubusercontent.com/formancehq/earthly/refs/heads/main/.goreleaser.default-v2.yaml builds: - binary: wallets @@ -24,9 +24,9 @@ builds: archives: - id: "{{.ProjectName}}" - builds: + ids: - wallets - format: tar.gz + formats: [tar.gz] name_template: "{{.ProjectName}}_{{.Os}}-{{.Arch}}" release: diff --git a/build.Dockerfile b/build.Dockerfile index 44aec32..fdf3d54 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -1,5 +1,6 @@ FROM ghcr.io/formancehq/base:22.04 -COPY wallets /usr/bin/wallets +ARG TARGETPLATFORM +COPY $TARGETPLATFORM/wallets /usr/bin/wallets ENV OTEL_SERVICE_NAME wallets ENTRYPOINT ["/usr/bin/wallets"] CMD ["server"] diff --git a/flake.lock b/flake.lock index ae75413..049c3e8 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,19 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nur", - "nixpkgs" - ] - }, + "goreleaser": { + "flake": false, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "lastModified": 1789616489, + "narHash": "sha256-VrxdD+TQcof1UsIKNgVow5sQLUATDaT+EwsMLS0awVo=", + "owner": "goreleaser", + "repo": "nur", + "rev": "52282e9a2d7c6882e9e0e8675d593b928c89e323", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "goreleaser", + "repo": "nur", + "rev": "52282e9a2d7c6882e9e0e8675d593b928c89e323", "type": "github" } }, @@ -49,32 +45,11 @@ "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1" } }, - "nur": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1773995199, - "narHash": "sha256-kk0qP4av44iEXXFSM8jHFav6UmZQTWdTXL8akBY/9yY=", - "owner": "nix-community", - "repo": "NUR", - "rev": "95f13832a9c21e62b9ded15280102dc73cf6826d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "root": { "inputs": { + "goreleaser": "goreleaser", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", - "nur": "nur" + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index 95be414..6bed0a4 100644 --- a/flake.nix +++ b/flake.nix @@ -5,13 +5,13 @@ nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2511"; nixpkgs-unstable.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; - nur = { - url = "github:nix-community/NUR"; - inputs.nixpkgs.follows = "nixpkgs"; + goreleaser = { + url = "github:goreleaser/nur/52282e9a2d7c6882e9e0e8675d593b928c89e323"; + flake = false; }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nur }: + outputs = { self, nixpkgs, nixpkgs-unstable, goreleaser }: let supportedSystems = [ "x86_64-linux" @@ -25,7 +25,7 @@ let pkgs = import nixpkgs { inherit system; - overlays = [ nur.overlays.default ]; + overlays = [ ]; config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "goreleaser-pro" ]; @@ -96,7 +96,7 @@ golangci-lint ]; otherPackages = [ - pkgs.nur.repos.goreleaser.goreleaser-pro + (pkgs.callPackage "${goreleaser}/pkgs/goreleaser-pro" { }) self.packages.${system}.speakeasy ]; in diff --git a/scratch.Dockerfile b/scratch.Dockerfile index 9bd0659..84de51a 100644 --- a/scratch.Dockerfile +++ b/scratch.Dockerfile @@ -1,5 +1,6 @@ FROM ghcr.io/formancehq/base:scratch -COPY wallets /usr/bin/wallets +ARG TARGETPLATFORM +COPY $TARGETPLATFORM/wallets /usr/bin/wallets ENV OTEL_SERVICE_NAME wallets ENTRYPOINT ["/usr/bin/wallets"] CMD ["server"]