Skip to content

Commit

Permalink
flake with packaging for ilia
Browse files Browse the repository at this point in the history
  • Loading branch information
hallettj committed Feb 24, 2025
1 parent 2c9080b commit 6528a93
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};

outputs = { self, nixpkgs, systems }:
let
perSystem = callback: nixpkgs.lib.genAttrs (import systems) (system: callback (initPkgs system));
initPkgs = system: nixpkgs.legacyPackages.${system};
in
{
packages = perSystem (pkgs: rec {
# Run ilia in the project repo with:
#
# $ nix run
#
# or run without cloning the repo with:
#
# $ nix run github:regolith-linux/ilia
#
default = ilia;
ilia = pkgs.callPackage ./nix/ilia.nix { source = ./.; };
});
};
}
51 changes: 51 additions & 0 deletions nix/ilia.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ source # source must be given explicitly when calling callPackage

# callPackage automatically populates all of these arguments from nixpkgs
, atk
, cairo
, gobject-introspection
, gtk3
, gtk-layer-shell
, json-glib
, lib
, libgee
, meson
, ninja
, pkg-config
, stdenv
, tinysparql
, uncrustify
, vala
, wrapGAppsHook3
}:

stdenv.mkDerivation {
name = "ilia";
src = source;
postPatch = ''
patchShebangs meson_scripts
'';
nativeBuildInputs = [
meson
ninja
pkg-config
uncrustify
vala
wrapGAppsHook3 # wraps the executable to register gsettings-schemas files
];
buildInputs = [
atk
cairo
gobject-introspection # avoids error, "Package Gtk-3.0 not found in Vala API directories or Ggobject-introspection GIR directories"
gtk3
gtk-layer-shell
json-glib
libgee
tinysparql
];
meta = {
homepage = "https://github.com/regolith-linux/ilia?tab=readme-ov-file";
license = [ lib.licenses.asl20 ];
};
}

0 comments on commit 6528a93

Please sign in to comment.