restrict hydraJobs to systems x64-64-linux and aarch64-linux
This commit is contained in:
parent
b7a1a6c07e
commit
d63eb2b9d1
129
flake.nix
129
flake.nix
@ -12,68 +12,81 @@
|
|||||||
utils,
|
utils,
|
||||||
naersk,
|
naersk,
|
||||||
}:
|
}:
|
||||||
utils.lib.eachDefaultSystem (
|
let
|
||||||
system:
|
packageOutputs = utils.lib.eachDefaultSystem (
|
||||||
let
|
system:
|
||||||
pkgs = import nixpkgs { inherit system; };
|
let
|
||||||
naersk-lib = pkgs.callPackage naersk { };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
naersk-lib = pkgs.callPackage naersk { };
|
||||||
|
|
||||||
# Needed at compile time (on build system)
|
# Needed at compile time (on build system)
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
gtk4
|
gtk4
|
||||||
cairo
|
cairo
|
||||||
glib
|
glib
|
||||||
pkg-config
|
pkg-config
|
||||||
poppler
|
poppler
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
# Needed at runtime (on run system)
|
# Needed at runtime (on run system)
|
||||||
buildInputs = with pkgs; [ ];
|
buildInputs = with pkgs; [ ];
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
defaultPackage = naersk-lib.buildPackage {
|
defaultPackage = naersk-lib.buildPackage {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
inherit buildInputs;
|
inherit buildInputs;
|
||||||
inherit nativeBuildInputs;
|
inherit nativeBuildInputs;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp ${./music-reader.desktop} $out/share/applications/music-reader.desktop
|
cp ${./music-reader.desktop} $out/share/applications/music-reader.desktop
|
||||||
|
|
||||||
mkdir -p $out/share/icons
|
mkdir -p $out/share/icons
|
||||||
cp ${./music-reader.png} $out/share/icons/music-reader.png
|
cp ${./music-reader.png} $out/share/icons/music-reader.png
|
||||||
|
|
||||||
mkdir -p $out/share/glib-2.0/schemas
|
mkdir -p $out/share/glib-2.0/schemas
|
||||||
cp ${./de.frajul.music-reader.gschema.xml} $out/share/glib-2.0/schemas/de.frajul.music-reader.gschema.xml
|
cp ${./de.frajul.music-reader.gschema.xml} $out/share/glib-2.0/schemas/de.frajul.music-reader.gschema.xml
|
||||||
glib-compile-schemas $out/share/glib-2.0/schemas/
|
glib-compile-schemas $out/share/glib-2.0/schemas/
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
devShell =
|
|
||||||
with pkgs;
|
|
||||||
mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
pre-commit
|
|
||||||
rustPackages.clippy
|
|
||||||
|
|
||||||
gtk4
|
|
||||||
cairo
|
|
||||||
glib
|
|
||||||
pkg-config
|
|
||||||
poppler
|
|
||||||
wrapGAppsHook
|
|
||||||
];
|
|
||||||
# Without inheriting nativeBuildinputs, cargo build will fail but that is good since we want to use only nix build
|
|
||||||
# inherit nativeBuildInputs;
|
|
||||||
|
|
||||||
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
|
||||||
};
|
};
|
||||||
|
devShell =
|
||||||
|
with pkgs;
|
||||||
|
mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
rustfmt
|
||||||
|
pre-commit
|
||||||
|
rustPackages.clippy
|
||||||
|
|
||||||
hydraJobs = {
|
gtk4
|
||||||
"music-reader" = defaultPackage;
|
cairo
|
||||||
};
|
glib
|
||||||
}
|
pkg-config
|
||||||
);
|
poppler
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
# Without inheriting nativeBuildinputs, cargo build will fail but that is good since we want to use only nix build
|
||||||
|
# inherit nativeBuildInputs;
|
||||||
|
|
||||||
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Only create hydra jobs for some systems
|
||||||
|
# pkgs.lib.optionalAttrs (builtins.elem system ["x86_64-linux" "aarch64-linux"]) {
|
||||||
|
# hydraJobs =
|
||||||
|
# {
|
||||||
|
# "music-reader" = defaultPackage;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
|
packageOutputs
|
||||||
|
// {
|
||||||
|
hydraJobs = {
|
||||||
|
x86_64-linux.music-reader = packageOutputs.defaultPackage.x86_64-linux;
|
||||||
|
aarch64-linux.music-reader = packageOutputs.defaultPackage.aarch64-linux;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user