mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-30 21:23:04 +00:00
The Apache-2.0 relicensing left both Nix derivations declaring AGPL. Match their metadata to the project license and check both packages against the root manifest on every supported Nix system.
87 lines
2.3 KiB
Nix
87 lines
2.3 KiB
Nix
{
|
|
description = "Paseo - self-hosted daemon for AI coding agents";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
}:
|
|
let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
pkgsFor = system: import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
packages = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
paseo = pkgs.callPackage ./nix/package.nix { };
|
|
versionParts = pkgs.lib.splitString "." paseo.version;
|
|
sourceRevision = if self ? revCount && self.revCount != null then self.revCount else 0;
|
|
buildRevision = sourceRevision - (sourceRevision / 10000) * 10000;
|
|
desktopBuildVersion = pkgs.lib.concatStringsSep "." [
|
|
(builtins.elemAt versionParts 0)
|
|
(builtins.elemAt versionParts 1)
|
|
(toString buildRevision)
|
|
];
|
|
in
|
|
{
|
|
default = paseo;
|
|
paseo = paseo;
|
|
desktop = pkgs.callPackage ./nix/desktop-package.nix {
|
|
inherit paseo;
|
|
buildVersion = desktopBuildVersion;
|
|
};
|
|
}
|
|
);
|
|
|
|
checks = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
packages = self.packages.${system};
|
|
license = (builtins.fromJSON (builtins.readFile ./package.json)).license;
|
|
in
|
|
{
|
|
license-metadata =
|
|
assert packages.paseo.meta.license.spdxId == license;
|
|
assert packages.desktop.meta.license.spdxId == license;
|
|
pkgs.runCommand "paseo-license-metadata" { } "touch $out";
|
|
}
|
|
);
|
|
|
|
nixosModules.default = self.nixosModules.paseo;
|
|
nixosModules.paseo =
|
|
{ pkgs, lib, ... }:
|
|
{
|
|
imports = [ ./nix/module.nix ];
|
|
services.paseo.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
};
|
|
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
in
|
|
{
|
|
default = pkgs.mkShell {
|
|
packages = [
|
|
pkgs.nodejs_22
|
|
pkgs.python3
|
|
];
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|