fix(nix): fix makeDesktopItem (#1215)
This commit is contained in:
parent
2c08c425c7
commit
54b0859e40
4 changed files with 57 additions and 57 deletions
24
default.nix
24
default.nix
|
|
@ -1,14 +1,14 @@
|
|||
(import
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
})
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
})
|
||||
.defaultNix
|
||||
|
|
|
|||
|
|
@ -13,23 +13,24 @@
|
|||
generatedCargoNix
|
||||
;
|
||||
|
||||
project = import
|
||||
(generatedCargoNix {
|
||||
inherit name src;
|
||||
})
|
||||
{
|
||||
inherit pkgs;
|
||||
buildRustCrateForPkgs = pkgs:
|
||||
pkgs.buildRustCrate.override {
|
||||
defaultCrateOverrides =
|
||||
pkgs.defaultCrateOverrides
|
||||
// {
|
||||
# Crate dependency overrides go here
|
||||
zellij = attrs: {
|
||||
inherit postInstall desktopItems meta name nativeBuildInputs;
|
||||
project =
|
||||
import
|
||||
(generatedCargoNix {
|
||||
inherit name src;
|
||||
})
|
||||
{
|
||||
inherit pkgs;
|
||||
buildRustCrateForPkgs = pkgs:
|
||||
pkgs.buildRustCrate.override {
|
||||
defaultCrateOverrides =
|
||||
pkgs.defaultCrateOverrides
|
||||
// {
|
||||
# Crate dependency overrides go here
|
||||
zellij = attrs: {
|
||||
inherit postInstall desktopItems meta name nativeBuildInputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
project.workspaceMembers.zellij.build
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ flake-utils.lib.eachSystem [
|
|||
|
||||
rustToolchainToml = pkgs.rust-bin.fromRustupToolchainFile ../rust-toolchain;
|
||||
cargoLock = {
|
||||
lockFile = (builtins.path {
|
||||
lockFile = builtins.path {
|
||||
path = ../Cargo.lock;
|
||||
name = "Cargo.lock";
|
||||
});
|
||||
};
|
||||
};
|
||||
cargo = rustToolchainToml;
|
||||
rustc = rustToolchainToml;
|
||||
|
|
@ -107,7 +107,7 @@ flake-utils.lib.eachSystem [
|
|||
comment = "Manage your terminal applications";
|
||||
exec = "zellij";
|
||||
icon = "zellij";
|
||||
categories = ["ConsoleOnly;System"];
|
||||
categories = ["ConsoleOnly"];
|
||||
})
|
||||
];
|
||||
meta = with pkgs.lib; {
|
||||
|
|
@ -130,19 +130,18 @@ in rec {
|
|||
};
|
||||
|
||||
# native nixpkgs support - keep supported
|
||||
packages.zellij-native =
|
||||
(pkgs.makeRustPlatform {inherit cargo rustc;}).buildRustPackage {
|
||||
inherit
|
||||
src
|
||||
name
|
||||
cargoLock
|
||||
buildInputs
|
||||
nativeBuildInputs
|
||||
postInstall
|
||||
desktopItems
|
||||
meta
|
||||
;
|
||||
};
|
||||
packages.zellij-native = (pkgs.makeRustPlatform {inherit cargo rustc;}).buildRustPackage {
|
||||
inherit
|
||||
src
|
||||
name
|
||||
cargoLock
|
||||
buildInputs
|
||||
nativeBuildInputs
|
||||
postInstall
|
||||
desktopItems
|
||||
meta
|
||||
;
|
||||
};
|
||||
|
||||
defaultPackage = packages.zellij;
|
||||
|
||||
|
|
|
|||
24
shell.nix
24
shell.nix
|
|
@ -1,14 +1,14 @@
|
|||
(import
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
})
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ./.;
|
||||
})
|
||||
.shellNix
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue