Create .nix/default.nix
{ action }:
let src = import ./src.nix;
in import "${src.gotk4-nix}/${action}.nix" {
base = import ./base.nix;
}
Use like so:
nix-build .nix --argstr action build-cross
nix-build .nix --argstr action build-package
{}: import ./.nix { action = "shell"; }
build-package
cross-compiles for Linux x86_64 and aarch64. It generates the
following:
result
├── gtkcord4-linux-aarch64.tar.gz
├── gtkcord4-linux-x86_64.tar.gz
├── gtkcord4-nixos-aarch64.tar.gz
└── gtkcord4-nixos-x86_64.tar.gz
build-package
creates a proper Nix package. It generates the following:
result
├── bin
│ └── gtkcord4
└── share
├── applications
│ └── com.github.diamondburned.gtkcord4.desktop
└── icons
└── hicolor
└── 256x256
└── apps
└── gtkcord4.png