Add a flake.nix for Nix packaging; document nix install paths in README
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
16f5d7351f
commit
47606a64b7
3 changed files with 94 additions and 0 deletions
53
flake.nix
Normal file
53
flake.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
description = "Aggregate and sync events between CalDAV, Google Calendar and iCal feeds";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||
in
|
||||
{
|
||||
packages = forEachSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
rec {
|
||||
calcalist = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "calcalist";
|
||||
version = cargoToml.package.version;
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
# tests/caldav.rs spins up radicale and pimsync as real
|
||||
# processes; it's a dev-time integration gate (devbox run
|
||||
# check), not something a package build should re-run.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = cargoToml.package.description;
|
||||
license = pkgs.lib.licenses.mit;
|
||||
mainProgram = "calcalist";
|
||||
platforms = pkgs.lib.platforms.linux;
|
||||
};
|
||||
};
|
||||
default = calcalist;
|
||||
}
|
||||
);
|
||||
|
||||
apps = forEachSystem (system: rec {
|
||||
calcalist = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.calcalist}/bin/calcalist";
|
||||
};
|
||||
default = calcalist;
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue