Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,40 @@ User settings and notification preferences:
yay -S omniglyph
```

### Nix

#### Run without installing

```shell
nix run github:pshycodr/omniglyph
```

#### Install via nix profile

```shell
nix profile install github:pshycodr/omniglyph
```

#### NixOS / Home Manager

Add to your flake inputs:

```nix
inputs.omniglyph.url = "github:pshycodr/omniglyph";
```

Then add to your packages:

```nix
environment.systemPackages = [ inputs.omniglyph.packages.${system}.default ];
```

Or with Home Manager:

```nix
home.packages = [ inputs.omniglyph.packages.${system}.default ];
```

OR

### Installer Script
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

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

113 changes: 113 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
description = "OmniGlyph — fast emoji and Unicode symbol picker (GTK4 + Python)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python313;
pythonEnv = python.withPackages (
ps: with ps; [
pygobject3
rapidfuzz
tomli-w
nuitka
]
);
omniglyph = pkgs.stdenv.mkDerivation {
pname = "omniglyph";
version = "1.1.0";
src = pkgs.fetchFromGitHub {
owner = "pshycodr";
repo = "omniglyph";
rev = "v1.1.0";
hash = "sha256-R6i72CiNOj8dMhYf9rMX49je8WOG1OZp2MenacHzTEU=";
};
nativeBuildInputs = with pkgs; [
gobject-introspection
autoPatchelfHook
gcc
makeWrapper
];
buildInputs = with pkgs; [
gtk4
libadwaita
gtk4-layer-shell
glib
cairo
pango
harfbuzz
graphene
gdk-pixbuf
pythonEnv
];
dontConfigure = true;
buildPhase = ''
runHook preBuild
export HOME=$TMPDIR
export PYTHONPATH=${pythonEnv}/${python.sitePackages}
${pythonEnv}/bin/python3 -m nuitka \
--standalone \
--enable-plugin=implicit-imports \
--include-package=gi \
--include-package=gi.repository \
--include-data-dir=glyph/db/collections=db/collections \
--include-data-dir=glyph/styles=styles \
--output-dir=out \
glyph/main.py
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/omniglyph $out/bin
cp -r out/main.dist/. $out/lib/omniglyph/
makeWrapper $out/lib/omniglyph/main.bin $out/bin/omniglyph \
--prefix GI_TYPELIB_PATH : "${pkgs.gtk4}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.libadwaita}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.gtk4-layer-shell}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.gobject-introspection}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.glib.out}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.pango.out}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.gdk-pixbuf}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.harfbuzz}/lib/girepository-1.0" \
--prefix GI_TYPELIB_PATH : "${pkgs.graphene}/lib/girepository-1.0"
runHook postInstall
'';
meta = {
description = "Fast emoji and Unicode symbol picker for Linux (GTK4 + Libadwaita)";
homepage = "https://github.com/pshycodr/omniglyph";
license = pkgs.lib.licenses.gpl3Only;
mainProgram = "omniglyph";
};
};
in
{
packages.default = omniglyph;
packages.omniglyph = omniglyph;
apps.default = flake-utils.lib.mkApp { drv = omniglyph; };
devShells.default = pkgs.mkShell {
packages = with pkgs; [
pythonEnv
gtk4
libadwaita
gtk4-layer-shell
gobject-introspection
pango
harfbuzz
graphene
gdk-pixbuf
cairo
];
};
}
);
}