Skip to content

Commit

Permalink
nix: remove unnecessary files from package source and disable action …
Browse files Browse the repository at this point in the history
…for aarch64-linux
  • Loading branch information
akshettrj committed Jun 30, 2024
1 parent e0e6225 commit ffc973a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/cache_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,3 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build --accept-flake-config -L .#packages.x86_64-linux.watgbridge
aarch64-linux:
needs: [x86_64-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
DEBIAN_FRONTEND=noninteractive
sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
mkdir -p ~/.config/nix
sudo bash -c "echo system-features = aarch64-linux arm-linux >> /etc/nix/nix.conf"
- uses: cachix/cachix-action@v14
with:
name: watgbridge
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build -L \
--option system aarch64-linux \
--option sandbox false \
--extra-platforms aarch64-linux \
--accept-flake-config \
.#packages.aarch64-linux.watgbridge
27 changes: 24 additions & 3 deletions nix/pkgs/watgbridge-dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@
, buildGoApplication
}:

buildGoApplication rec {
let

localSrc = builtins.path {
path = ../../.;
name = "watgbridge";
filter = path: type: (
builtins.baseNameOf path != "flake.nix" &&
builtins.baseNameOf path != "flake.lock" &&
builtins.baseNameOf path != "README.md" &&
builtins.baseNameOf path != "sample_config.yaml" &&
builtins.baseNameOf path != "watgbridge.service.sample" &&
builtins.baseNameOf path != ".github" &&
builtins.baseNameOf path != "nix" &&
builtins.baseNameOf path != "assets" &&
builtins.baseNameOf path != ".envrc" &&
builtins.baseNameOf path != ".gitignore" &&
builtins.baseNameOf path != "Dockerfile" &&
builtins.baseNameOf path != "LICENSE"
);
};

in buildGoApplication rec {
pname = "watgbridge";
version = "1.9.0";

pwd = ../../.;
src = ../../.;
pwd = localSrc;
src = localSrc;

ldflags = [ "-s" "-w" ];

Expand Down

0 comments on commit ffc973a

Please sign in to comment.