fix(nix): fix makeDesktopItem (#1215)

This commit is contained in:
a-kenji 2022-03-13 13:43:29 +01:00 committed by GitHub
parent 2c08c425c7
commit 54b0859e40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 57 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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