File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,6 +93,20 @@ $ ln -s /path/to/boomer/overlay/ boomer
9393$ nix-env -iA nixos.boomer
9494```
9595
96+ ## NixOS Flake
97+
98+ ### Run
99+
100+ ```
101+ $ nix run github:tsoding/boomer
102+ ```
103+
104+ ### Installation
105+
106+ ```
107+ $ nix profile install github:tsoding/boomer
108+ ```
109+
96110## References
97111
98112- https://github.com/nim-lang/x11/blob/bf9dc74dd196a98b7c2a2beea4d92640734f7c60/examples/x11ex.nim
Original file line number Diff line number Diff line change 1+ {
2+ description = "Zoomer application for Linux" ;
3+ inputs = {
4+ flake-utils . url = "github:numtide/flake-utils" ;
5+ } ;
6+
7+ outputs = {
8+ self ,
9+ nixpkgs ,
10+ flake-utils ,
11+ } :
12+ flake-utils . lib . eachDefaultSystem (
13+ system : let
14+ pkgs = nixpkgs . legacyPackages . ${ system } ;
15+ in {
16+ formatter = pkgs . alejandra ;
17+ packages = rec {
18+ boomer = let
19+ opengl = pkgs . nimPackages . buildNimPackage rec {
20+ pname = "opengl" ;
21+ version = "1.2.8" ;
22+ src = pkgs . fetchFromGitHub {
23+ owner = "nim-lang" ;
24+ repo = "opengl" ;
25+ rev = version ;
26+ hash = "sha256-OHdoPJsmCFdyKV7FGd/r+6nh6NRF7TPhuAx7o/VpiDg=" ;
27+ } ;
28+ } ;
29+ in
30+ pkgs . nimPackages . buildNimPackage {
31+ pname = "boomer" ;
32+ version = "0.0.1" ;
33+ nimBinOnly = true ;
34+
35+ src = ./. ;
36+
37+ buildInputs = with pkgs . nimPackages ; [
38+ x11
39+ opengl
40+ ] ;
41+ propagatedBuildInputs = with pkgs ; [
42+ xorg . libX11
43+ xorg . libXrandr
44+ xorg . libXext
45+ libGL
46+ libGLU
47+ ] ;
48+ meta = with nixpkgs . lib ; {
49+ mainProgram = "boomer" ;
50+ description = "Zoomer application for Linux" ;
51+ homepage = "https://github.com/tsoding/boomer" ;
52+ license = licenses . mit ;
53+ } ;
54+ } ;
55+ default = boomer ;
56+ } ;
57+ apps = rec {
58+ boomer = flake-utils . lib . mkApp { drv = self . packages . ${ system } . boomer ; } ;
59+ default = boomer ;
60+ } ;
61+ }
62+ ) ;
63+ }
You can’t perform that action at this time.
0 commit comments