Skip to content

Commit

Permalink
fix: merge conflicts & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Chickensoupwithrice authored and jleightcap committed Aug 2, 2023
1 parent aeb35ec commit c655538
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 52 deletions.
10 changes: 3 additions & 7 deletions all-packages.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{ newScope, ... }:
let
{newScope, ...}: let
self = rec {
libgnunetchat = callPackage ./pkgs/libgnunetchat {};
gnunet-messenger-cli = callPackage ./pkgs/gnunet-messenger-cli {};
liberaforms = callPackage ./pkgs/liberaforms {};
liberaforms-env = callPackage ./pkgs/liberaforms/env.nix {};
flarum = callPackage ./pkgs/flarum {};
kikit = callPackage ./pkgs/kikit {};
flarum = callPackage ./pkgs/flarum { };
libgnunetchat = callPackage ./pkgs/libgnunetchat { };
Expand All @@ -22,4 +18,4 @@ let

callPackage = newScope (self // nixpkgs-candidates // {inherit callPackage;});
in
self
self
73 changes: 30 additions & 43 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,44 @@
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, php-nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = php-nixpkgs.legacyPackages.${system};
in
{
packages = import ./all-packages.nix { inherit (pkgs) newScope; };
nixosModules = {
modules = import ./modules/all-modules.nix;
ngipkgs = { ... }: {
# inject an additional argument into the module system evaluation.
# this way our package set can be accessed separately and we don't have
# to muck around with overlays (which don't work with flakes as you'd expect)
_module.args.ngipkgs = self.packages.${system};
};
};
# XXX: fugly hack to work around literal quoting of attribute paths passed to `nixos-container`.
# without it we'd have to pass `x86_64-linux.<container>`, which will
# be taken as a single attribute name and not an attribute path (i.e. a dot-separated
# sequence attribute names)
}) // {
nixosConfigurations =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
all-configurations = import ./configs/all-configurations.nix { inherit pkgs; };
inject-ngipkgs = k: v: pkgs.nixos ({ ... }: { imports = [ self.nixosModules.x86_64-linux.ngipkgs v ]; });
in
builtins.mapAttrs inject-ngipkgs all-configurations;

hydraJobs = {
packages.x86_64-linux = self.packages.x86_64-linux;
outputs = {
self,
nixpkgs,
php-nixpkgs,
flake-utils,
treefmt-nix,
...
}: let
buildOutputs = system: let
pkgs = nixpkgs.legacyPackages.${system};
php-pkgs = php-nixpkgs.legacyPackages.${system};
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in {
packages = import ./all-packages.nix {inherit (php-pkgs) newScope;};
nixosModules = {
modules = import ./modules/all-modules.nix;
ngipkgs = {...}: {
# Inject an additional argument into the module system evaluation.
# This way our package set can be accessed separately and we don't have
# to muck around with overlays (which don't work with flakes as you'd expect)
_module.args.ngipkgs = self.packages.${system};
};
};

formatter = treefmtEval.config.build.wrapper;
};

checkOutputs = system:
let
checkOutputs = system: let
pkgs = nixpkgs.legacyPackages.${system};
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in
{
in {
# Configurations have to go in checkOutputs (ie, avoid `eachDefaultSystem`) to generate
# a single attribute name for nixos-container deployments (`<config-name>`), because
# nixos-container can't parse dot-separated sequence attribute paths (`x86_64-linux.<config-name>`).
nixosConfigurations =
let
all-configurations = import ./configs/all-configurations.nix { inherit pkgs; };
inject-ngipkgs = k: v: pkgs.nixos ({ ... }: { imports = [ self.nixosModules.${system}.ngipkgs v ]; });
in
nixosConfigurations = let
all-configurations = import ./configs/all-configurations.nix {inherit pkgs;};
inject-ngipkgs = k: v: pkgs.nixos ({...}: {imports = [self.nixosModules.${system}.ngipkgs v];});
in
builtins.mapAttrs inject-ngipkgs all-configurations;

# To generate a Hydra jobset for CI builds of all packages
Expand All @@ -78,5 +65,5 @@
};
};
in
(flake-utils.lib.eachDefaultSystem buildOutputs) // (checkOutputs "x86_64-linux");
}
(flake-utils.lib.eachDefaultSystem buildOutputs) // (checkOutputs "x86_64-linux");
}
File renamed without changes.
8 changes: 6 additions & 2 deletions default.nix → pkgs/flarum/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{ fetchFromGitHub, fetchurl, lib, php }:

{
fetchFromGitHub,
fetchurl,
lib,
php,
}:
php.buildComposerProject (finalAttrs: {
pname = "flarum";
version = "1.8.0";
Expand Down

0 comments on commit c655538

Please sign in to comment.