home/himalaya: overlay pkg to my dev repo

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-04 16:00:22 +03:00
parent 47e9554029
commit 1c5b476417
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 22 additions and 11 deletions

View file

@ -6,6 +6,8 @@ in
{ {
imports = (import ./ui) ++ (import ./shell) ++ (import ./progs); imports = (import ./ui) ++ (import ./shell) ++ (import ./progs);
nixpkgs.overlays = import ../overlays;
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = secrets.userName; home.username = secrets.userName;

View file

@ -5,14 +5,6 @@ with lib;
let let
cfg = config.progs.himalaya; cfg = config.progs.himalaya;
devHimalaya = pkgs.himalaya.overrideAttrs (oldAttrs: {
src = builtins.fetchGit {
url = "https://github.com/soywod/himalaya.git";
ref = "development";
rev = "ba8ef9adf6effc40674765f995d19e9cfd1a8636";
};
});
himz = with pkgs; stdenv.mkDerivation { himz = with pkgs; stdenv.mkDerivation {
name = "himz-0.1"; name = "himz-0.1";
src = ../../scripts; src = ../../scripts;
@ -29,8 +21,6 @@ let
runHook postInstall runHook postInstall
''; '';
}; };
bin = "${devHimalaya}/bin/himalaya";
in in
{ {
options.progs.himalaya = { options.progs.himalaya = {
@ -45,7 +35,7 @@ in
home.packages = [ himz ]; home.packages = [ himz ];
programs.himalaya = { programs.himalaya = {
enable = true; enable = true;
package = devHimalaya; package = pkgs.my-himalaya;
settings = { settings = {
default-page-size = 20; default-page-size = 20;
downloads-dir = "${config.home.homeDirectory}/downloads/email"; downloads-dir = "${config.home.homeDirectory}/downloads/email";

3
overlays/default.nix Normal file
View file

@ -0,0 +1,3 @@
[
(import ./himalaya.nix)
]

16
overlays/himalaya.nix Normal file
View file

@ -0,0 +1,16 @@
final: prev: {
my-himalaya = prev.himalaya.overrideAttrs (oldAttrs: rec {
src = prev.fetchFromGitHub {
owner = "pleshevskiy";
repo = "himalaya";
rev = "e3d76874a24addbad542d42491a3d8234fbbca03";
sha256 = "sha256-IiDGZKGLIDgDQe8XE6ekYKzqXwp/v/zuEpMQlKiteT0=";
};
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const {
name = "${oldAttrs.pname}-vendor.tar.gz";
inherit src;
outputHash = "sha256-HqKHP8sa7Gj6DsaNIzLrslFu0veH9rDnYCnpFK5mxdM=";
});
});
}