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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ $ ln -s /path/to/boomer/overlay/ boomer
$ nix-env -iA nixos.boomer
```

## NixOS Flake

### Run

```
$ nix run github:tsoding/boomer
```

### Installation

```
$ nix profile install github:tsoding/boomer
```

## References

- https://github.com/nim-lang/x11/blob/bf9dc74dd196a98b7c2a2beea4d92640734f7c60/examples/x11ex.nim
Expand Down
58 changes: 58 additions & 0 deletions flake.lock

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

49 changes: 49 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
description = "Zoomer application for Linux";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.alejandra;
packages = rec {
boomer = pkgs.buildNimPackage {
pname = "boomer";
version = "0.0.1";

src = ./.;

lockFile = ./lock.json;

propagatedBuildInputs = with pkgs; [
xorg.libX11
xorg.libXrandr
xorg.libXext
libGL
libGLU
];

meta = with nixpkgs.lib; {
mainProgram = "boomer";
description = "Zoomer application for Linux";
homepage = "https://github.com/tsoding/boomer";
license = licenses.mit;
};
};
default = boomer;
};
apps = rec {
boomer = flake-utils.lib.mkApp {drv = self.packages.${system}.boomer;};
default = boomer;
};
}
);
}
28 changes: 28 additions & 0 deletions lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"depends": [
{
"method": "fetchzip",
"path": "/nix/store/8qaywzr8nzsiddjba77nhf75hzmxx0d9-source",
"rev": "29aca5e519ebf5d833f63a6a2769e62ec7bfb83a",
"sha256": "16npqgmi2qawjxaddj9ax15rfpdc7sqc37i2r5vg23lyr6znq4wc",
"url": "https://github.com/nim-lang/x11/archive/29aca5e519ebf5d833f63a6a2769e62ec7bfb83a.tar.gz",
"ref": "1.2",
"packages": [
"x11"
],
"srcDir": ""
},
{
"method": "fetchzip",
"path": "/nix/store/dvv6cgzl9xmax5rmjxnp5wrr08ibvjaw-source",
"rev": "8e2e098f82dc5eefd874488c37b5830233cd18f4",
"sha256": "01csz5bl4jiv7jx76k7izgknl7k73y2i9hd9s6brlhfqhq7cqxmz",
"url": "https://github.com/nim-lang/opengl/archive/8e2e098f82dc5eefd874488c37b5830233cd18f4.tar.gz",
"ref": "1.2.9",
"packages": [
"opengl"
],
"srcDir": "src"
}
]
}