Skip to content

Instantly share code, notes, and snippets.

@pinpox

pinpox/theme.nix Secret

Created December 3, 2020 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinpox/2a41a04f723aa3b2d7bcfab8b97a8df0 to your computer and use it in GitHub Desktop.
Save pinpox/2a41a04f723aa3b2d7bcfab8b97a8df0 to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, stdenv, fetchFromGitHub, sass, glib, libxml2, gdk-pixbuf, gtk_engines, autoreconfHook
, gtk-engine-murrine, ... }:
let vars = import ./vars.nix;
in {
nixpkgs.overlays = [
(self: super: {
generated-gtk-theme = self.stdenv.mkDerivation rec {
name = "phocus-gtk-theme";
src = pkgs.fetchFromGitHub {
repo = "gtk";
owner = "phocus";
rev = "master";
sha256 = "0xh28098hafbdlrbqd3si55z1kdghsm973c74dl7kfd0ylkp5csn";
};
HOME="./build";
# buildInputs = [ self.gtk_engines self.sass ];
buildInputs = [ pkgs.nodejs self.sass self.glib self.libxml2 self.gdk-pixbuf ];
# buildPhase = ''
# HOME=/build
# make
# npm run build
# '';
# # propagatedUserEnvPkgs = [ self.gtk-engine-murrine ];
# installPhase = ''
# make install
# '';
postPatch = ''
patchShebangs .
substituteInPlace Makefile --replace '$(INSTALL_DIR)' $out
'';
};
})
];
# GTK settings
gtk = {
enable = true;
font = { name = "${vars.font.normal.family} ${vars.font.normal.style} ${builtins.toString vars.font.size}"; };
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Generated";
package = pkgs.generated-gtk-theme;
};
gtk3.extraConfig.gtk-cursor-theme-name = "breeze";
};
home.sessionVariables.GTK_THEME = "Generated";
}
@pinpox
Copy link
Author

pinpox commented Dec 3, 2020

Fails with:

▸ home-manager switch
these derivations will be built:
  /nix/store/7rvsc0fqy67sy6yrgj5csnixcyd6mvqs-phocus-gtk-theme.drv
  /nix/store/7ra35g1gi4d07ibln828a6sjisp4k85b-home-manager-path.drv
  /nix/store/w2k84xr9p7v3v6mvfmg88p4h267k3yhg-activation-script.drv
  /nix/store/9hh2h162acxpglxdk54340ihcqpis5xq-home-manager-generation.drv
building '/nix/store/7rvsc0fqy67sy6yrgj5csnixcyd6mvqs-phocus-gtk-theme.drv'...
unpacking sources
unpacking source archive /nix/store/my1522dpa2kb459fvk8qlqdc3v6dy81b-source
source root is source
patching sources
patching script interpreter paths in .
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/516z50fm1jbpcl32qnzy7kynrh0vl22w-bash-4.4-p23/bin/bash
npm install && npm run build
npm ERR! code ENOTFOUND[0m lock using /build/source/build/.
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /build/source/build/.npm/_logs/2020-12-03T15_29_53_340Z-debug.log
make: *** [Makefile:6: all] Error 1
builder for '/nix/store/7rvsc0fqy67sy6yrgj5csnixcyd6mvqs-phocus-gtk-theme.drv' failed with exit code 2
cannot build derivation '/nix/store/7ra35g1gi4d07ibln828a6sjisp4k85b-home-manager-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9hh2h162acxpglxdk54340ihcqpis5xq-home-manager-generation.drv': 1 dependencies couldn't be built
error: build of '/nix/store/9hh2h162acxpglxdk54340ihcqpis5xq-home-manager-generation.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment