revert: add back fu

This commit is contained in:
isabel 2024-08-07 10:46:15 +01:00
parent a930638109
commit 082b45be63
No known key found for this signature in database
GPG key ID: 7F2F6BD6997FCDF7
2 changed files with 72 additions and 58 deletions

34
flake.lock generated
View file

@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1722415718, "lastModified": 1722415718,
@ -18,6 +36,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
} }
@ -41,6 +60,21 @@
"repo": "rust-overlay", "repo": "rust-overlay",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,6 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -12,30 +13,16 @@
self, self,
nixpkgs, nixpkgs,
rust-overlay, rust-overlay,
flake-utils,
... ...
}: }:
flake-utils.lib.eachDefaultSystem (
system:
let let
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
inherit (nixpkgs) lib;
forEachSystem =
f:
(lib.listToAttrs (
map (system: {
name = system;
value = f {
inherit system;
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ overlays = [
rust-overlay.overlays.default rust-overlay.overlays.default
( (
final: prev: final: prev:
let let
@ -50,9 +37,6 @@
) )
]; ];
}; };
};
}) systems
));
rev = self.shortRev or self.dirtyShortRev or "dirty"; rev = self.shortRev or self.dirtyShortRev or "dirty";
date = self.lastModifiedDate or self.lastModified or "19700101"; date = self.lastModifiedDate or self.lastModified or "19700101";
@ -61,24 +45,20 @@
+ "pre${builtins.substring 0 8 date}_${rev}"; + "pre${builtins.substring 0 8 date}_${rev}";
in in
{ {
packages = forEachSystem ( packages = {
{ pkgs, system }:
{
yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { inherit version rev date; }; yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { inherit version rev date; };
yazi = pkgs.callPackage ./nix/yazi.nix { inherit (self.packages.${system}) yazi-unwrapped; }; yazi = pkgs.callPackage ./nix/yazi.nix { inherit (self.packages.${system}) yazi-unwrapped; };
default = self.packages.${system}.yazi; default = self.packages.${system}.yazi;
} };
);
devShells = forEachSystem ( devShells = {
{ pkgs, ... }:
{
default = pkgs.callPackage ./nix/shell.nix { }; default = pkgs.callPackage ./nix/shell.nix { };
};
formatter = pkgs.nixfmt-rfc-style;
} }
); )
// {
formatter = forEachSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
overlays = { overlays = {
default = self.overlays.yazi; default = self.overlays.yazi;
yazi = _: prev: { inherit (self.packages.${prev.stdenv.system}) yazi yazi-unwrapped; }; yazi = _: prev: { inherit (self.packages.${prev.stdenv.system}) yazi yazi-unwrapped; };