Skip to content

Commit

Permalink
add/test: wallpaper-ventura
Browse files Browse the repository at this point in the history
  • Loading branch information
Erven2016 committed Aug 25, 2024
1 parent 1aa823f commit 8a40f21
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
13 changes: 9 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@
# commands such as:
# nix-build -A mypackage

{ pkgs ? import <nixpkgs> { } }:
{
pkgs ? import <nixpkgs> { },
}:

{
# The `lib`, `modules`, and `overlays` names are special
lib = import ./lib { inherit pkgs; }; # functions
modules = import ./modules; # NixOS modules
overlays = import ./overlays; # nixpkgs overlays

# example-package = pkgs.callPackage ./pkgs/example-package { };
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
imports = [ ./pkgs/wallpaper ];

# Fonts
otf-pingfang = pkgs.callPackage ./pkgs/fonts/otf-pingfang { };
otf-sf-pro = pkgs.callPackage ./pkgs/fonts/otf-sf-pro { };
"wallpaper-ventura" = pkgs.callPackage ./pkgs/wallpapers/build.nix {
name = "Ventura";
format = "png";
hash = "sha256-d1BtZZm5bRnPGMs3e9k/XpIEa4tGxuqOrg4SA//NQxg=";
};
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions pkgs/wallpapers/build.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
name,
format,
hash,
stdenvNoCC,
fetchzip,
...
}:
let
inherit name format hash;

pname = "wallpaper-${name}";
version = "2024.08.00-01";
in
stdenvNoCC.mkDerivation {
inherit pname version;
src = fetchzip {
# url = "https://github.com/Erven2016/custom-gnome-wallpapers-for-nixos/raw/main/${name}.zip";
url = "https://github.com/Erven2016/custom-gnome-wallpapers-for-nixos/releases/download/${name}/${name}.zip";
hash = hash;
stripRoot = false;
};

installPhase = ''
runHook preInstall
install -D *.xml -t $out/share/gnome-background-properties
install -D *.${format} -t $out/share/backgrounds/custom
runHook postInstall
'';
}

0 comments on commit 8a40f21

Please sign in to comment.