Merge kktdr:admin/overlays-personal

This commit is contained in:
Martin Potier 2019-05-16 14:44:13 +03:00
commit 572e929b58
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E
5 changed files with 174 additions and 122 deletions

View file

@ -10,15 +10,22 @@ self: super:
"term" # Disable ligature/ligation
];
in
super.iosevka.override {
nodejs = super.nodejs-8_x;
design = tags;
set = "PPStyle";
};
super.iosevka.override {
nodejs = super.nodejs-8_x;
design = tags;
set = "PPStyle";
};
vim-samae = super.callPackage ./vim {};
reaper-samae = super.callPackage ./reaper {};
# Bug fixes:
kitty07 = super.callPackage ./kitty {};
# VCVRack has a bug when used with Xmonad that makes the UI
# crash almost immediately There's a workaround documented here
# (https://github.com/VCVRack/Rack/issues/478#issuecomment-456174702) and it
# requires applying a patch on the source before building.
vcv-rack-xmonad = super.callPackage ./vcv-rack {};
scientifica-font = super.callPackage ./scientifica-font {};
curie-font = super.callPackage ./curie-font {};
@ -26,21 +33,7 @@ self: super:
ripmime = super.ripmime.override {
stdenv = super.overrideCC super.stdenv super.gcc6;
};
spotify = super.spotify.overrideDerivation (
old: {
src = super.fetchurl {
url = "https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.0.77.338.g758ebd78-41_amd64.deb";
sha256 = "1971jc0431pl8yixpl37ryl2l0pqdf0xjvkg59nqdwj3vbdx5606";
};
});
# Probably not needed anymore
#nixops = super.nixops.overrideDerivation (
#old: {
# patchPhase = ''
# substituteInPlace nix/eval-machine-info.nix \
# --replace 'system.nixosVersion' 'system.nixos.version'
# '';
#});
# Originally from Mats Rauhala ®2018
copy = super.writeScriptBin "copy" ''
function clean() {

View file

@ -1,45 +0,0 @@
{ stdenv, fetchFromGitHub, pkgs, python3Packages, glfw, libunistring, harfbuzz, fontconfig, zlib, pkgconfig, ncurses, imagemagick, makeWrapper, xsel, libstartup_notification, libX11, libXrandr, libXinerama, libXcursor, libxkbcommon, libXi, libXext }:
with python3Packages;
buildPythonApplication rec {
version = "0.7.0";
name = "kitty-${version}";
format = "other";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "kitty";
rev = "v${version}";
sha256 = "0x92w30caym042bmln6nw6f3v764sg06c2kb9hrwpmh6nhlxcs90";
};
buildInputs = [ fontconfig glfw ncurses libunistring harfbuzz libX11 libXrandr libXinerama libXcursor libxkbcommon libXi libXext ];
nativeBuildInputs = [ pkgconfig ];
postPatch = ''
substituteInPlace kitty/utils.py \
--replace "find_library('startup-notification-1')" "'${libstartup_notification}/lib/libstartup-notification-1.so'"
'';
buildPhase = ''
python3 setup.py linux-package
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r linux-package/{bin,share,lib} $out
wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ]}"
runHook postInstall
'';
meta = with stdenv.lib; {
homepage = https://github.com/kovidgoyal/kitty;
description = "A modern, hackable, featureful, OpenGL based terminal emulator";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ tex ];
};
}

View file

@ -1,56 +0,0 @@
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty
, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
, withGraphite2 ? true # it is small and major distros do include it
}:
let
version = "1.5.1";
inherit (stdenv.lib) optional optionals optionalString;
in
stdenv.mkDerivation {
name = "harfbuzz${optionalString withIcu "-icu"}-${version}";
src = fetchurl {
url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.bz2";
sha256 = "56838dfdad2729b8866763c82d623354d138a4d99d9ffb710c7d377b5cfc7c51";
};
outputs = [ "out" "dev" ];
outputBin = "dev";
configureFlags = [
( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default
( "--with-icu=" + (if withIcu then "yes" else "no") )
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ glib freetype cairo ] # recommended by upstream
++ libintlOrEmpty;
propagatedBuildInputs = []
++ optional withGraphite2 graphite2
++ optionals withIcu [ icu harfbuzz ]
;
# Slightly hacky; some pkgs expect them in a single directory.
postInstall = optionalString withIcu ''
rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc"
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.la
ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc
${optionalString stdenv.isDarwin ''
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.0.dylib
''}
'';
meta = with stdenv.lib; {
description = "An OpenType text shaping engine";
homepage = http://www.freedesktop.org/wiki/Software/HarfBuzz;
downloadPage = "https://www.freedesktop.org/software/harfbuzz/release/";
maintainers = [ maintainers.eelco ];
platforms = with platforms; linux ++ darwin;
inherit version;
updateWalker = true;
};
}

59
pkgs/reaper/default.nix Normal file
View file

@ -0,0 +1,59 @@
{ stdenv, fetchurl, autoPatchelfHook, makeWrapper
, alsaLib, xorg
, gnome3, gtk3, pango, gdk_pixbuf, cairo, glib, freetype
, libpulseaudio, xdg_utils
}:
stdenv.mkDerivation rec {
name = "reaper-${version}";
version = "5.978";
src = fetchurl {
url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz";
sha256 = "0na7364zxxcic5mq4vaaj4va0g6rhwnwn9fg5gb421iba29ylmhg";
};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
buildInputs = [
alsaLib
xorg.libX11
xorg.libXi
gdk_pixbuf
pango
cairo
glib
freetype
xdg_utils
];
runtimeDependencies = [
gtk3
];
dontBuild = true;
installPhase = ''
XDG_DATA_HOME="$out/share" ./install-reaper.sh \
--install $out/opt \
--integrate-user-desktop
rm $out/opt/REAPER/uninstall-reaper.sh
wrapProgram $out/opt/REAPER/reaper \
--prefix LD_LIBRARY_PATH : ${libpulseaudio}/lib
mkdir $out/bin
ln -s $out/opt/REAPER/reaper $out/bin/
ln -s $out/opt/REAPER/reamote-server $out/bin/
'';
meta = with stdenv.lib; {
description = "Digital audio workstation";
homepage = https://www.reaper.fm/;
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}

101
pkgs/vcv-rack/default.nix Normal file
View file

@ -0,0 +1,101 @@
{ stdenv, makeWrapper, fetchFromBitbucket, fetchFromGitHub, pkgconfig
, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
, libzip, rtaudio, rtmidi, speex, writeText }:
let
glfw-git = glfw.overrideAttrs (oldAttrs: rec {
name = "glfw-git-${version}";
version = "unstable-2018-05-29";
src = fetchFromGitHub {
owner = "glfw";
repo = "glfw";
rev = "0be4f3f75aebd9d24583ee86590a38e741db0904";
sha256 = "0zbcjgc7ks25yi949k0wjknfl00a4dqmz45mhp00k62vlq2sj0i5";
};
buildInputs = oldAttrs.buildInputs ++ [ libXext libXi ];
});
pfft-source = fetchFromBitbucket {
owner = "jpommier";
repo = "pffft";
rev = "29e4f76ac53bef048938754f32231d7836401f79";
sha256 = "084csgqa6f1a270bhybjayrh3mpyi2jimc87qkdgsqcp8ycsx1l1";
};
xmonad-patch = writeText "xmonad-workaround.patch" ''
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -20,6 +20,7 @@ static json_t *settingsToJson() {
json_t *tokenJ = json_string(gToken.c_str());
json_object_set_new(rootJ, "token", tokenJ);
+ /*
if (!windowIsMaximized()) {
// windowSize
Vec windowSize = windowGetWindowSize();
@@ -31,6 +32,7 @@ static json_t *settingsToJson() {
json_t *windowPosJ = json_pack("[f, f]", windowPos.x, windowPos.y);
json_object_set_new(rootJ, "windowPos", windowPosJ);
}
+ */
// opacity
float opacity = gToolbar->wireOpacitySlider->value;
'';
in
with stdenv.lib; stdenv.mkDerivation rec {
name = "VCV-Rack-${version}";
version = "0.6.2b";
src = fetchFromGitHub {
owner = "VCVRack";
repo = "Rack";
rev = "v${version}";
sha256 = "17ynhxcci6dyn1yi871fd8yli4924fh12pmk510djwkcj5crhas6";
fetchSubmodules = true;
};
prePatch = ''
ln -s ${pfft-source} dep/jpommier-pffft-source
mkdir -p dep/include
cp dep/jpommier-pffft-source/*.h dep/include
cp dep/nanosvg/src/*.h dep/include
cp dep/nanovg/src/*.h dep/include
cp dep/osdialog/*.h dep/include
cp dep/oui-blendish/*.h dep/include
substituteInPlace include/audio.hpp --replace "<RtAudio.h>" "<rtaudio/RtAudio.h>"
substituteInPlace compile.mk --replace "-march=nocona" ""
substituteInPlace Makefile \
--replace "-Wl,-Bstatic" "" \
--replace "-lglfw3" "-lglfw"
'';
enableParallelBuilding = true;
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex ];
patches = [ xmonad-patch ];
buildFlags = "Rack";
installPhase = ''
install -D -m755 -t $out/bin Rack
cp -r res $out/
mkdir -p $out/share/rack
cp LICENSE.txt LICENSE-dist.txt $out/share/rack
# Override the default global resource file directory
wrapProgram $out/bin/Rack --add-flags "-g $out"
'';
meta = with stdenv.lib; {
description = "Open-source virtual modular synthesizer";
homepage = http://vcvrack.com/;
# The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or unfree
license = [ licenses.bsd3 licenses.cc-by-nc-40 licenses.unfree ];
maintainers = with maintainers; [ moredread ];
platforms = platforms.linux;
};
}