mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Adding default.nix for flake-compat (#4279)
This way non-flake users can access packages with niv or npins easily,
and as flake-compat is already a dependency, this is just a "glue".
Copy-pasted from
[here](ff81ac966b (usage)
).
An example with npins would be:
`npins add github ghostty-org ghostty`
and then in the config:
```nix
{pkgs, ...}: let
sources = import ./npins;
ghostty = import sources.ghostty;
in {
environment.systemPackages = [ ghostty.packages.${pkgs.system}.default ];
}
```
This commit is contained in:
13
default.nix
Normal file
13
default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
nodeName = lock.nodes.root.inputs.flake-compat;
|
||||
in
|
||||
fetchTarball {
|
||||
url =
|
||||
lock.nodes.${nodeName}.locked.url
|
||||
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||
}
|
||||
) {src = ./.;})
|
||||
.defaultNix
|
Reference in New Issue
Block a user