diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-08-09 18:28:15 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-08-09 18:28:15 +0200 |
commit | d9fa74ba7891cfae4a029ee79dd29e4ab3425385 (patch) | |
tree | 82f79c8dc3d5cf7108055155e6332f64485b0acf /pkgs/misc | |
parent | 8b834605628fabd43b1b26a1724fb22c83150e2d (diff) | |
parent | 8c7fa1e836b8929d29c7ec34f968a3eef11e69de (diff) | |
download | nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar.gz nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar.bz2 nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar.lz nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar.xz nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.tar.zst nixlib-d9fa74ba7891cfae4a029ee79dd29e4ab3425385.zip |
Merge master into staging
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/emulators/caprice32/default.nix | 6 | ||||
-rw-r--r-- | pkgs/misc/emulators/ccemux/default.nix | 66 | ||||
-rw-r--r-- | pkgs/misc/screensavers/xlockmore/default.nix | 10 | ||||
-rw-r--r-- | pkgs/misc/tmux-plugins/default.nix | 68 | ||||
-rw-r--r-- | pkgs/misc/urbit/default.nix | 37 | ||||
-rwxr-xr-x | pkgs/misc/vscode-extensions/update_installed_exts.sh | 74 |
6 files changed, 196 insertions, 65 deletions
diff --git a/pkgs/misc/emulators/caprice32/default.nix b/pkgs/misc/emulators/caprice32/default.nix index c0c3b40f6b65..42b8e5229e99 100644 --- a/pkgs/misc/emulators/caprice32/default.nix +++ b/pkgs/misc/emulators/caprice32/default.nix @@ -3,14 +3,14 @@ stdenv.mkDerivation rec { repo = "caprice32"; - version = "unstable-2018-02-10"; - rev = "53de69543300f81af85df32cbd21bb5c68cab61e"; + version = "unstable-2018-03-05"; + rev = "317fe638111e245d67e301f6f295094d3c859a70"; name = "${repo}-${version}"; src = fetchFromGitHub { inherit rev repo; owner = "ColinPitrat"; - sha256 = "12yv56blm49qmshpk4mgc802bs51wv2ra87hmcbf2wxma39c45fy"; + sha256 = "1bywpmkizixcnr057k8zq9nlw0zhcmwkiriln0krgdcm7d3h9b86"; }; postPatch = "substituteInPlace cap32.cfg --replace /usr/local $out"; diff --git a/pkgs/misc/emulators/ccemux/default.nix b/pkgs/misc/emulators/ccemux/default.nix new file mode 100644 index 000000000000..bd2be99a2843 --- /dev/null +++ b/pkgs/misc/emulators/ccemux/default.nix @@ -0,0 +1,66 @@ +{ stdenv, fetchurl, fetchFromGitHub, makeDesktopItem, makeWrapper, jre +, useCCTweaked ? true +}: + +let + version = "1.1.0"; + rev = "a12239148332ca7a0b1c44a93e1585452d3631c9"; + + baseUrl = "https://emux.cc/versions/${stdenv.lib.substring 0 8 rev}/CCEmuX"; + jar = + if useCCTweaked + then fetchurl { + url = "${baseUrl}-cct.jar"; + sha256 = "1i767v3wnb8jsh7ciqqvw548pka1b8vl18k1rdv5dn21la6n0r1d"; + } + else fetchurl { + url = "${baseUrl}-cc.jar"; + sha256 = "0x9hs814ln193cwybd565mcj6vhnii4wirkiz9na7vcas0y5vmmq"; + }; + + desktopIcon = fetchurl { + url = "https://github.com/CCEmuX/CCEmuX/raw/${rev}/src/main/resources/img/icon.png"; + sha256 = "1vmb6rg9k2y99j8xqfgbsvfgfi3g985rmqwrd7w3y54ffr2r99c2"; + }; + desktopItem = makeDesktopItem { + name = "CCEmuX"; + exec = "ccemux"; + icon = "${desktopIcon}"; + comment = "A modular ComputerCraft emulator"; + desktopName = "CCEmuX"; + genericName = "ComputerCraft Emulator"; + categories = "Application;Emulator;"; + }; +in + +stdenv.mkDerivation rec { + name = "ccemux-${version}"; + + src = jar; + unpackPhase = "true"; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ jre ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,share/ccemux} + cp -r ${desktopItem}/share/applications $out/share/applications + + install -D ${src} $out/share/ccemux/ccemux.jar + install -D ${desktopIcon} $out/share/pixmaps/ccemux.png + + makeWrapper ${jre}/bin/java $out/bin/ccemux \ + --add-flags "-jar $out/share/ccemux/ccemux.jar" + + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "A modular ComputerCraft emulator"; + homepage = https://github.com/CCEmuX/CCEmuX; + license = licenses.mit; + maintainers = with maintainers; [ CrazedProgrammer ]; + }; +} diff --git a/pkgs/misc/screensavers/xlockmore/default.nix b/pkgs/misc/screensavers/xlockmore/default.nix index b9294e294e9d..47c3c67366e3 100644 --- a/pkgs/misc/screensavers/xlockmore/default.nix +++ b/pkgs/misc/screensavers/xlockmore/default.nix @@ -1,20 +1,18 @@ -{ stdenv, lib, fetchurl, pam ? null, autoreconfHook -, libX11, libXext, libXinerama, libXdmcp, libXt }: +{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama +, libXdmcp, libXt }: stdenv.mkDerivation rec { - name = "xlockmore-5.55"; + name = "xlockmore-5.56"; src = fetchurl { url = "http://sillycycle.com/xlock/${name}.tar.xz"; - sha256 = "1y3f76rq2nd10fgi2rx81aj6pijglmm661vjsxi05hpg35dzmwfl"; + sha256 = "1dg1n79rnswhxqz36mxnl5lp8p37i9fbibnzzyrqknmvf2s8xpd0"; curlOpts = "--user-agent 'Mozilla/5.0'"; }; # Optionally, it can use GTK+. buildInputs = [ pam libX11 libXext libXinerama libXdmcp libXt ]; - nativeBuildInputs = [ autoreconfHook ]; - # Don't try to install `xlock' setuid. Password authentication works # fine via PAM without super user privileges. configureFlags = diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index b29565d01ecb..fb95b667d864 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -3,18 +3,19 @@ let rtpPath = "share/tmux-plugins"; - addRtp = path: pluginName: attrs: derivation: - derivation // { rtp = "${derivation}/${path}/${builtins.replaceStrings ["-"] ["_"] pluginName}.tmux"; } // { - overrideAttrs = f: buildTmuxPlugin (attrs // f attrs); + addRtp = path: rtpFilePath: attrs: derivation: + derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // { + overrideAttrs = f: mkDerivation (attrs // f attrs); }; - buildTmuxPlugin = a@{ + mkDerivation = a@{ pluginName, + rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux", namePrefix ? "tmuxplugin-", src, unpackPhase ? "", - configurePhase ? "", - buildPhase ? "", + configurePhase ? ":", + buildPhase ? ":", addonInfo ? null, preInstall ? "", postInstall ? "", @@ -22,7 +23,7 @@ let dependencies ? [], ... }: - addRtp "${rtpPath}/${path}" pluginName a (stdenv.mkDerivation (a // { + addRtp "${rtpPath}/${path}" rtpFilePath a (stdenv.mkDerivation (a // { name = namePrefix + pluginName; inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; @@ -43,14 +44,11 @@ let dependencies = [ pkgs.bash ] ++ dependencies; })); - buildTmuxPluginFrom2Nix = a: buildTmuxPlugin ({ - buildPhase = ":"; - configurePhase =":"; - } // a); - in rec { - battery = buildTmuxPluginFrom2Nix { + inherit mkDerivation; + + battery = mkDerivation { pluginName = "battery"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-battery"; @@ -59,7 +57,7 @@ in rec { }; }; - continuum = buildTmuxPluginFrom2Nix { + continuum = mkDerivation { pluginName = "continuum"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-continuum"; @@ -69,7 +67,7 @@ in rec { dependencies = [ resurrect ]; }; - copycat = buildTmuxPluginFrom2Nix { + copycat = mkDerivation { pluginName = "copycat"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-copycat"; @@ -78,7 +76,7 @@ in rec { }; }; - cpu = buildTmuxPluginFrom2Nix { + cpu = mkDerivation { pluginName = "cpu"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-cpu"; @@ -87,7 +85,7 @@ in rec { }; }; - fpp = buildTmuxPluginFrom2Nix { + fpp = mkDerivation { pluginName = "fpp"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-fpp"; @@ -100,7 +98,17 @@ in rec { dependencies = [ pkgs.fpp ]; }; - logging = buildTmuxPluginFrom2Nix { + fzf-tmux-url = mkDerivation { + pluginName = "fzf-tmux-url"; + rtpFilePath = "fzf-url.tmux"; + src = fetchgit { + url = "https://github.com/wfxr/tmux-fzf-url"; + rev = "ecd518eec1067234598c01e655b048ff9d06ef2f"; + sha256 = "0png8hdv91y2nivq5vdii2192mb2qcrkwwn69lzxrdnbfa27qrgv"; + }; + }; + + logging = mkDerivation { pluginName = "logging"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-logging"; @@ -109,7 +117,7 @@ in rec { }; }; - net-speed = buildTmuxPluginFrom2Nix { + net-speed = mkDerivation { pluginName = "net-speed"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-net-speed"; @@ -118,7 +126,7 @@ in rec { }; }; - maildir-counter = buildTmuxPluginFrom2Nix { + maildir-counter = mkDerivation { pluginName = "maildir-counter"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-maildir-counter"; @@ -127,7 +135,7 @@ in rec { }; }; - online-status = buildTmuxPluginFrom2Nix { + online-status = mkDerivation { pluginName = "online-status"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-online-status"; @@ -136,7 +144,7 @@ in rec { }; }; - open = buildTmuxPluginFrom2Nix { + open = mkDerivation { pluginName = "open"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-open"; @@ -145,7 +153,7 @@ in rec { }; }; - pain-control = buildTmuxPluginFrom2Nix { + pain-control = mkDerivation { pluginName = "pain-control"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-pain-control"; @@ -154,7 +162,7 @@ in rec { }; }; - prefix-highlight = buildTmuxPluginFrom2Nix { + prefix-highlight = mkDerivation { pluginName = "prefix-highlight"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-prefix-highlight"; @@ -163,7 +171,7 @@ in rec { }; }; - resurrect = buildTmuxPluginFrom2Nix { + resurrect = mkDerivation { pluginName = "resurrect"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-resurrect"; @@ -172,7 +180,7 @@ in rec { }; }; - sensible = buildTmuxPluginFrom2Nix { + sensible = mkDerivation { pluginName = "sensible"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-sensible"; @@ -181,7 +189,7 @@ in rec { }; }; - sessionist = buildTmuxPluginFrom2Nix { + sessionist = mkDerivation { pluginName = "sessionist"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-sessionist"; @@ -190,7 +198,7 @@ in rec { }; }; - sidebar = buildTmuxPluginFrom2Nix { + sidebar = mkDerivation { pluginName = "sidebar"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-sidebar"; @@ -199,7 +207,7 @@ in rec { }; }; - urlview = buildTmuxPluginFrom2Nix { + urlview = mkDerivation { pluginName = "urlview"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-urlview"; @@ -212,7 +220,7 @@ in rec { dependencies = [ pkgs.urlview ]; }; - yank = buildTmuxPluginFrom2Nix { + yank = mkDerivation { pluginName = "yank"; src = fetchgit { url = "https://github.com/tmux-plugins/tmux-yank"; diff --git a/pkgs/misc/urbit/default.nix b/pkgs/misc/urbit/default.nix index df13c15562dd..e356e83436dd 100644 --- a/pkgs/misc/urbit/default.nix +++ b/pkgs/misc/urbit/default.nix @@ -1,39 +1,24 @@ -{ stdenv, fetchFromGitHub, gcc, gmp, libsigsegv, openssl, automake, autoconf, ragel, - cmake, re2c, libtool, ncurses, perl, zlib, python2, curl }: +{ stdenv, fetchFromGitHub, curl, git, gmp, libsigsegv, meson, ncurses, ninja +, openssl, pkgconfig, re2c, zlib +}: stdenv.mkDerivation rec { name = "urbit-${version}"; - version = "0.4.5"; + version = "0.6.0"; src = fetchFromGitHub { owner = "urbit"; repo = "urbit"; - rev = "v${version}"; - sha256 = "1zgxgqbz74nsgfyrvsnjj6xxpb64mrnby7bb5qy733sy04gmzgik"; + rev = "urbit-${version}"; + sha256 = "158mz6c6y5z1b6piid8hvrl5mcqh8q1ny185gz51jayia51azmgs"; + fetchSubmodules = true; }; - buildInputs = with stdenv.lib; [ - gcc gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool - ncurses perl zlib python2 curl - ]; + nativeBuildInputs = [ pkgconfig ninja meson ]; + buildInputs = [ curl git gmp libsigsegv ncurses openssl re2c zlib ]; - # uses 'readdir_r' deprecated by glibc 2.24 - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; - - configurePhase = '' - : - ''; - - buildPhase = '' - sed -i 's/-lcurses/-lncurses/' Makefile - mkdir -p $out - cp -r . $out/ - cd $out - make - ''; - - installPhase = '' - : + postPatch = '' + patchShebangs . ''; meta = with stdenv.lib; { diff --git a/pkgs/misc/vscode-extensions/update_installed_exts.sh b/pkgs/misc/vscode-extensions/update_installed_exts.sh new file mode 100755 index 000000000000..fdbc14fb2642 --- /dev/null +++ b/pkgs/misc/vscode-extensions/update_installed_exts.sh @@ -0,0 +1,74 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl jq unzip +set -eu -o pipefail + +# Helper to just fail with a message and non-zero exit code. +function fail() { + echo "$1" >&2 + exit 1 +} + +# Helper to clean up after ourself if we're killed by SIGINT +function clean_up() { + TDIR="${TMPDIR:-/tmp}" + echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2 + rm -Rf "$TDIR/vscode_exts_*" +} + +function get_vsixpkg() { + N="$1.$2" + + # Create a tempdir for the extension download + EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX) + + URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" + + # Quietly but delicately curl down the file, blowing up at the first sign of trouble. + curl --silent --show-error --fail -X GET -o "$EXTTMP/$N.zip" "$URL" + # Unpack the file we need to stdout then pull out the version + VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json")) + # Calculate the SHA + SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip") + + # Clean up. + rm -Rf "$EXTTMP" + # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate + + cat <<-EOF + { + name = "$2"; + publisher = "$1"; + version = "$VER"; + sha256 = "$SHA"; + } +EOF +} + +# See if can find our code binary somewhere. +if [ $# -ne 0 ]; then + CODE=$1 +else + CODE=$(command -v code) +fi + +if [ -z "$CODE" ]; then + # Not much point continuing. + fail "VSCode executable not found" +fi + +# Try to be a good citizen and clean up after ourselves if we're killed. +trap clean_up SIGINT + +# Begin the printing of the nix expression that will house the list of extensions. +printf '{ extensions = [\n' + +# Note that we are only looking to update extensions that are already installed. +for i in $($CODE --list-extensions) +do + OWNER=$(echo "$i" | cut -d. -f1) + EXT=$(echo "$i" | cut -d. -f2) + + get_vsixpkg "$OWNER" "$EXT" +done +# Close off the nix expression. +printf '];\n}' |