Fix nix run

Otherwise nix 2.8 and newer will give this error message:

```
>> nix --version; nix run github:martinvonz/jj
nix (Nix) 2.11.1
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'
```
This commit is contained in:
Michael Forster 2023-01-11 09:09:39 +01:00 committed by Martin von Zweigbergk
parent d197eddea6
commit 3bd0c50090

View file

@ -14,7 +14,7 @@
foreachSystem = f: lib.foldl' (attrs: system: lib.recursiveUpdate attrs (f system)) { } systems;
in
{
overlay = (final: prev: {
overlays.default = (final: prev: {
jujutsu = final.callPackage
(
{ stdenv
@ -78,13 +78,15 @@
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
overlays = [ self.overlays.default ];
};
in
{
packages.${system}.jujutsu = pkgs.jujutsu;
defaultPackage.${system} = self.packages.${system}.jujutsu;
defaultApp.${system} = {
packages.${system} = {
jujutsu = pkgs.jujutsu;
default = self.packages.${system}.jujutsu;
};
apps.${system}.default = {
type = "app";
program = "${pkgs.jujutsu}/bin/jj";
};