mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 02:50:19 +00:00
clean namings
This commit is contained in:
parent
c57988770a
commit
a066774f22
1 changed files with 10 additions and 10 deletions
20
flake.nix
20
flake.nix
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, gitignore, fenix, naersk, ... }:
|
outputs = { self, nixpkgs, gitignore, fenix, naersk, ... }:
|
||||||
let
|
let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
inherit (gitignore.lib) gitignoreSource;
|
inherit (gitignore.lib) gitignoreSource;
|
||||||
|
|
||||||
staticRustFlags = [ "-Ctarget-feature=+crt-static" ];
|
staticRustFlags = [ "-Ctarget-feature=+crt-static" ];
|
||||||
|
@ -191,8 +192,9 @@
|
||||||
in
|
in
|
||||||
rust.buildPackage package;
|
rust.buildPackage package;
|
||||||
|
|
||||||
|
# TODO: move this to postInstall
|
||||||
buildArchives = targetSystem:
|
buildArchives = targetSystem:
|
||||||
let himalaya = pkgs.lib.getExe self.apps.${buildSystem}.${targetSystem};
|
let himalaya = self.apps.${buildSystem}.${targetSystem}.program;
|
||||||
in pkgs.writeShellScriptBin "himalaya-archives" ''
|
in pkgs.writeShellScriptBin "himalaya-archives" ''
|
||||||
export WINEPREFIX="$(mktemp -d)"
|
export WINEPREFIX="$(mktemp -d)"
|
||||||
mkdir -p {man,completions}
|
mkdir -p {man,completions}
|
||||||
|
@ -208,12 +210,10 @@
|
||||||
|
|
||||||
defaultPackage = buildPackage buildSystem crossSystems.${buildSystem}.${buildSystem};
|
defaultPackage = buildPackage buildSystem crossSystems.${buildSystem}.${buildSystem};
|
||||||
packages = builtins.mapAttrs buildPackage crossSystems.${buildSystem};
|
packages = builtins.mapAttrs buildPackage crossSystems.${buildSystem};
|
||||||
archives = pkgs.lib.foldlAttrs (p: k: _: p // { "${k}-archives" = buildArchives k; }) { } crossSystems.${buildSystem};
|
archives = lib.foldlAttrs (p: k: _: p // { "${k}-archives" = buildArchives k; }) { } crossSystems.${buildSystem};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{ default = defaultPackage; } // packages // archives;
|
||||||
default = defaultPackage;
|
|
||||||
} // packages // archives;
|
|
||||||
|
|
||||||
mkApps = buildSystem:
|
mkApps = buildSystem:
|
||||||
let
|
let
|
||||||
|
@ -237,12 +237,12 @@
|
||||||
in
|
in
|
||||||
{ default = defaultApp; } // apps;
|
{ default = defaultApp; } // apps;
|
||||||
|
|
||||||
supportedSystems = builtins.attrNames crossSystems;
|
eachSystem = lib.genAttrs (builtins.attrNames crossSystems);
|
||||||
mapSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
apps = mapSupportedSystem mkApps;
|
apps = eachSystem mkApps;
|
||||||
packages = mapSupportedSystem mkPackages;
|
packages = eachSystem mkPackages;
|
||||||
devShells = mapSupportedSystem mkDevShells;
|
devShells = eachSystem mkDevShells;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue