fix: Allow unfree packages in Nix configuration
Set allowUnfree = true to allow building towerops packages which are marked with unfree license.
This commit is contained in:
parent
44b5c204fa
commit
1ad737e010
1 changed files with 58 additions and 42 deletions
100
flake.nix
100
flake.nix
|
|
@ -17,60 +17,76 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, flake-parts, systems, pre-commit-hooks }:
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
systems,
|
||||
pre-commit-hooks,
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = import systems;
|
||||
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = false;
|
||||
};
|
||||
overlays = [
|
||||
# Pin specific Elixir and Erlang versions to match .tool-versions
|
||||
# Elixir 1.19.5-otp-28, Erlang 28.3
|
||||
(final: prev: {
|
||||
# Use Erlang 28 (OTP 28.3)
|
||||
erlang = prev.erlang_28;
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true; # Required for towerops (unfree license)
|
||||
};
|
||||
overlays = [
|
||||
# Pin specific Elixir and Erlang versions to match .tool-versions
|
||||
# Elixir 1.19.5-otp-28, Erlang 28.3
|
||||
(final: prev: {
|
||||
# Use Erlang 28 (OTP 28.3)
|
||||
erlang = prev.erlang_28;
|
||||
|
||||
# Use Elixir 1.19 with Erlang 28 (1.19.5-otp-28)
|
||||
elixir = prev.beam.packages.erlang_28.elixir_1_19;
|
||||
# Use Elixir 1.19 with Erlang 28 (1.19.5-otp-28)
|
||||
elixir = prev.beam.packages.erlang_28.elixir_1_19;
|
||||
|
||||
# Ensure beam packages use our pinned versions
|
||||
# This affects mixRelease and all BEAM-related builds
|
||||
beamPackages = prev.beam.packages.erlang_28;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
packages = {
|
||||
# C NIF shared library (cached separately from Elixir code)
|
||||
towerops-nif = pkgs.callPackage ./nix/c-nif.nix { };
|
||||
|
||||
# Main Elixir release
|
||||
towerops = pkgs.callPackage ./nix/build.nix {
|
||||
inherit (self'.packages) towerops-nif;
|
||||
# Ensure beam packages use our pinned versions
|
||||
# This affects mixRelease and all BEAM-related builds
|
||||
beamPackages = prev.beam.packages.erlang_28;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Docker OCI image (pure Nix, no Dockerfile)
|
||||
dockerImage = pkgs.callPackage ./nix/docker.nix {
|
||||
towerops = self'.packages.towerops;
|
||||
packages = {
|
||||
# C NIF shared library (cached separately from Elixir code)
|
||||
towerops-nif = pkgs.callPackage ./nix/c-nif.nix { };
|
||||
|
||||
# Main Elixir release
|
||||
towerops = pkgs.callPackage ./nix/build.nix {
|
||||
inherit (self'.packages) towerops-nif;
|
||||
};
|
||||
|
||||
# Docker OCI image (pure Nix, no Dockerfile)
|
||||
dockerImage = pkgs.callPackage ./nix/docker.nix {
|
||||
towerops = self'.packages.towerops;
|
||||
};
|
||||
|
||||
# Default package
|
||||
default = self'.packages.towerops;
|
||||
};
|
||||
|
||||
# Default package
|
||||
default = self'.packages.towerops;
|
||||
};
|
||||
# Development shell with PostgreSQL, Redis, LSPs, formatters
|
||||
devShells.default = pkgs.callPackage ./nix/shell.nix {
|
||||
pre-commit-hooks = inputs.pre-commit-hooks.lib.${system};
|
||||
};
|
||||
|
||||
# Development shell with PostgreSQL, Redis, LSPs, formatters
|
||||
devShells.default = pkgs.callPackage ./nix/shell.nix {
|
||||
pre-commit-hooks = inputs.pre-commit-hooks.lib.${system};
|
||||
# Nix formatter for flake files
|
||||
formatter = pkgs.nixfmt;
|
||||
};
|
||||
|
||||
# Nix formatter for flake files
|
||||
formatter = pkgs.nixfmt;
|
||||
};
|
||||
|
||||
flake = {
|
||||
# Cachix binary cache configuration
|
||||
# Setup instructions:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue