1
0
forked from extern/nix-config

meta: Replace joshuto package with overlay

This actually took *forever*, but now that I know how to write nixpkgs
overlays, any future ones I write should be relatively straight-forward.
This commit is contained in:
Donovan Glover 2023-06-05 23:07:04 -04:00
parent a0dae2344d
commit 7e38c259fa
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 24 additions and 27 deletions

View File

@ -1,6 +1,6 @@
{pkgs, ...}: {
environment.systemPackages = [
(pkgs.callPackage ../../packages/joshuto {})
environment.systemPackages = with pkgs; [
joshuto
];
home-manager.sharedModules = [

21
overlays/default.nix Normal file
View File

@ -0,0 +1,21 @@
{lib, ...}: {
nixpkgs.overlays = [
(final: prev: {
joshuto = prev.joshuto.overrideAttrs (oldAttrs: rec {
version = "493af3185092036cbbae81ae620b101f66cf4e9a";
src = final.fetchFromGitHub {
owner = "kamiyaa";
repo = "joshuto";
rev = "493af3185092036cbbae81ae620b101f66cf4e9a";
sha256 = "sha256-jLlDMV03eFWDB1D6pFEq2MFAfoVwFTy8ZpweS9syDB0=";
};
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (lib.const {
name = "joshuto.tar.gz";
inherit src;
outputHash = "sha256-cDy7sccuZj+RNjaDGjqczGl//zgmMAifjv/ZMEO/yyY=";
});
});
})
];
}

View File

@ -1,25 +0,0 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "joshuto";
version = "493af3185092036cbbae81ae620b101f66cf4e9a";
src = fetchFromGitHub {
owner = "kamiyaa";
repo = pname;
rev = version;
sha256 = "sha256-jLlDMV03eFWDB1D6pFEq2MFAfoVwFTy8ZpweS9syDB0=";
};
cargoSha256 = "sha256-dffKMgXhm4VpDSEzFW5d4oGCBKY/ppj1gx29Iw3Msc8=";
meta = with lib; {
description = "Ranger-like terminal file manager written in Rust";
homepage = "https://github.com/kamiyaa/joshuto";
license = licenses.lgpl3Only;
maintainers = with maintainers; [figsoda totoroot];
};
}

View File

@ -9,6 +9,7 @@
in {
imports = [
"${VARIABLES.hostHardwareConfiguration}"
../overlays
../modules
../containers/rar.nix
../containers/wine.nix