nix: inherit self from destructured args; get rid of rec

This commit is contained in:
NotAShelf
2024-06-04 19:21:46 +03:00
parent f3794681f8
commit 26d4a72901
2 changed files with 21 additions and 10 deletions

View File

@@ -10,10 +10,16 @@
};
};
outputs = inputs @ {flake-parts, ...}:
outputs = {
self,
flake-parts,
nixpkgs,
systems,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [flake-parts.flakeModules.easyOverlay];
systems = import inputs.systems;
systems = import systems;
perSystem = {
self',
@@ -80,7 +86,7 @@
overlayAttrs = config.packages;
};
flake = {self, ...}: {
flake = {
homeManagerModules = {
anyrun = import ./nix/hm-module.nix self;
default = self.homeManagerModules.anyrun;

View File

@@ -1,7 +1,9 @@
{
lib,
glib,
makeWrapper,
lockFile,
# Dependencies for Anyrun
glib,
rustPlatform,
atk,
gtk3,
@@ -11,16 +13,19 @@
rustfmt,
cargo,
rustc,
lockFile,
# Additional configuration arguments for the
# derivation. By default, we should not build
# any of the plugins.
dontBuildPlugins ? true,
...
}: let
cargoToml = builtins.fromTOML (builtins.readFile ../anyrun/Cargo.toml);
in
rustPlatform.buildRustPackage rec {
inherit (builtins) fromTOML readFile;
cargoToml = fromTOML (readFile ../anyrun/Cargo.toml);
pname = cargoToml.package.name;
version = cargoToml.package.version;
in
rustPlatform.buildRustPackage {
inherit pname version;
src = ../.;
buildInputs = [