Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3da395fd960f
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4756e6ff3b80
Choose a head ref
  • 18 commits
  • 19 files changed
  • 10 contributors

Commits on Jun 11, 2018

  1. Add buildGradleApp to androidenv

    ali-abrar authored and matthewbauer committed Jun 11, 2018
    Copy the full SHA
    62b59e5 View commit details
  2. add signing to buildGradleApp

    ali-abrar authored and matthewbauer committed Jun 11, 2018
    Copy the full SHA
    1cc64da View commit details
  3. Add android sdk license acceptance

    ali-abrar authored and matthewbauer committed Jun 11, 2018
    Copy the full SHA
    465e3a0 View commit details
  4. Copy the full SHA
    abddf4a View commit details
  5. Fix gradle build

    Ryan Trinkle authored and matthewbauer committed Jun 11, 2018
    Copy the full SHA
    fe04fe8 View commit details

Commits on Jun 20, 2018

  1. haskell: make generic builder follow compiler’s shared config

    enableShared in generic-builder.nix should default to what the GHC
    compiler was compiled with. Add a passthru to all of the GHC compilers
    to hold the value of enableShared. If enableShared is not set in the
    GHC we just use false as the default value for enableSharedLibraries.
    
    Note: I may have missed some compilers. Only GHC & GHCJS are covered
    by this commit but this shouldn’t break evaluation of anything else.
    matthewbauer authored and Ericson2314 committed Jun 20, 2018
    Copy the full SHA
    fd7a6ea View commit details

Commits on Jun 21, 2018

  1. tests.plasma5: Fixes OCR in sddm by providing a custom theme

    The custom theme just sets the old background colour that OCR works
    again.
    bkchr committed Jun 21, 2018
    Copy the full SHA
    51bafa6 View commit details
  2. erlangR21: init at 21.0

    goertzenator committed Jun 21, 2018
    Copy the full SHA
    4001a68 View commit details
  3. Copy the full SHA
    2e8feba View commit details
  4. parallel: 20180522 -> 20180622

    pSub committed Jun 21, 2018
    Copy the full SHA
    d401db4 View commit details
  5. Copy the full SHA
    b72da4b View commit details
  6. androidenv: add "androidsdk_latest" for latest sdk

    This is easier than having to remember which SDKs are supported, etc.
    Stuff based on this can become more future-proof.
    matthewbauer committed Jun 21, 2018
    Copy the full SHA
    2a0c328 View commit details
  7. Merge pull request #42329 from goertzenator/erlang-21.0

    add erlang-21.0
    LnL7 authored Jun 21, 2018
    Copy the full SHA
    26434c0 View commit details
  8. Merge pull request #41855 from obsidiansystems/gradle-app

    init androidenv.buildGradleApp
    matthewbauer authored Jun 21, 2018
    Copy the full SHA
    ec2ea29 View commit details
  9. Merge pull request #42311 from obsidiansystems/haskell-enable-shared-…

    …defaults
    
    haskell: make generic builder follow compiler’s shared config
    Ericson2314 authored Jun 21, 2018
    Copy the full SHA
    e050011 View commit details
  10. Merge pull request #42327 from bkchr/fix_plasma5_test

    tests.plasma5: Fixes OCR in sddm by providing a custom theme
    matthewbauer authored Jun 21, 2018
    Copy the full SHA
    fe948fd View commit details
  11. Copy the full SHA
    6906e5c View commit details
  12. Merge pull request #42354 from Mic92/hub

    gitAndTools.hub: remove go compiler from runtime closure
    Mic92 authored Jun 21, 2018
    Copy the full SHA
    4756e6f View commit details
18 changes: 16 additions & 2 deletions nixos/tests/plasma5.nix
Original file line number Diff line number Diff line change
@@ -6,13 +6,28 @@ import ./make-test.nix ({ pkgs, ...} :
maintainers = [ ttuegel ];
};

machine = { lib, ... }: {
machine = { lib, ... }:
let
sddm_theme = pkgs.stdenv.mkDerivation {
name = "breeze-ocr-theme";
phases = "buildPhase";
buildCommand = ''
mkdir -p $out/share/sddm/themes/
cp -r ${pkgs.plasma-workspace}/share/sddm/themes/breeze $out/share/sddm/themes/breeze-ocr-theme
chmod -R +w $out/share/sddm/themes/breeze-ocr-theme
printf "[General]\ntype=color\ncolor=#1d99f3\nbackground=\n" > $out/share/sddm/themes/breeze-ocr-theme/theme.conf
'';
};
in
{
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.theme = "breeze-ocr-theme";
services.xserver.desktopManager.plasma5.enable = true;
services.xserver.desktopManager.default = "plasma5";
virtualisation.memorySize = 1024;
environment.systemPackages = [ sddm_theme ];

# fontconfig-penultimate-0.3.3 -> 0.3.4 broke OCR apparently, but no idea why.
nixpkgs.config.packageOverrides = superPkgs: {
@@ -30,7 +45,6 @@ import ./make-test.nix ({ pkgs, ...} :
xdo = "${pkgs.xdotool}/bin/xdotool";
in ''
startAll;
# Wait for display manager to start
$machine->waitForText(qr/${user.description}/);
$machine->screenshot("sddm");
39 changes: 18 additions & 21 deletions pkgs/applications/version-management/git-and-tools/hub/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
{ stdenv, fetchgit, go, ronn, groff, utillinux, Security }:
{ stdenv, buildGoPackage, fetchFromGitHub, go, ronn, ruby, groff, Security, utillinux }:

stdenv.mkDerivation rec {
buildGoPackage rec {
name = "hub-${version}";
version = "2.4.0";

src = fetchgit {
url = https://github.com/github/hub.git;
rev = "refs/tags/v${version}";
goPackagePath = "github.com/github/hub";

src = fetchFromGitHub {
owner = "github";
repo = "hub";
rev = "v${version}";
sha256 = "1lr6vg0zhg2air9bnzcl811g97jraxq05l3cs46wqqflwy57xpz2";
};

buildInputs = [ groff ronn ruby utillinux ] ++
stdenv.lib.optional stdenv.isDarwin Security;

buildInputs = [ go ronn groff utillinux ]
++ stdenv.lib.optional stdenv.isDarwin Security;

buildPhase = ''
postPatch = ''
mkdir bin
ln -s ${ronn}/bin/ronn bin/ronn
patchShebangs .
make all man-pages
'';

installPhase = ''
prefix=$out sh -x < script/install.sh
mkdir -p "$out/share/zsh/site-functions"
cp "etc/hub.zsh_completion" "$out/share/zsh/site-functions/_hub"
mkdir -p "$out/etc/bash_completion.d"
cp "etc/hub.bash_completion.sh" "$out/etc/bash_completion.d/"
postInstall = ''
cd go/src/${goPackagePath}
install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
install -D etc/hub.bash_completion.sh "$bin/etc/bash_completion.d/hub.bash_completion.sh"
install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
# Should we also install provided git-hooks?
# And fish completion?
make man-pages
cp -r share/man $bin/share/man
'';

meta = with stdenv.lib; {
5 changes: 4 additions & 1 deletion pkgs/development/compilers/ghc/7.10.3-binary.nix
Original file line number Diff line number Diff line change
@@ -153,7 +153,10 @@ stdenv.mkDerivation rec {
[ $(./main) == "yes" ]
'';

passthru = { targetPrefix = ""; };
passthru = {
targetPrefix = "";
enableShared = true;
};

meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "armv7l-linux"];
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/7.10.3.nix
Original file line number Diff line number Diff line change
@@ -177,6 +177,7 @@ stdenv.mkDerivation rec {
inherit bootPkgs targetPrefix;

inherit llvmPackages;
inherit enableShared;

# Our Cabal compiler name
haskellCompilerName = "ghc-7.10.3";
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/8.0.2.nix
Original file line number Diff line number Diff line change
@@ -183,6 +183,7 @@ stdenv.mkDerivation rec {
inherit bootPkgs targetPrefix;

inherit llvmPackages;
inherit enableShared;

# Our Cabal compiler name
haskellCompilerName = "ghc-8.0.2";
5 changes: 4 additions & 1 deletion pkgs/development/compilers/ghc/8.2.1-binary.nix
Original file line number Diff line number Diff line change
@@ -155,7 +155,10 @@ stdenv.mkDerivation rec {
[ $(./main) == "yes" ]
'';

passthru = { targetPrefix = ""; };
passthru = {
targetPrefix = "";
enableShared = true;
};

meta.license = stdenv.lib.licenses.bsd3;
# AArch64 should work in theory but eventually some builds start segfaulting
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/8.2.2.nix
Original file line number Diff line number Diff line change
@@ -201,6 +201,7 @@ stdenv.mkDerivation rec {
inherit bootPkgs targetPrefix;

inherit llvmPackages;
inherit enableShared;

# Our Cabal compiler name
haskellCompilerName = "ghc-8.2.2";
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/8.4.3.nix
Original file line number Diff line number Diff line change
@@ -195,6 +195,7 @@ stdenv.mkDerivation rec {
inherit bootPkgs targetPrefix;

inherit llvmPackages;
inherit enableShared;

# Our Cabal compiler name
haskellCompilerName = "ghc-8.4.3";
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
@@ -191,6 +191,7 @@ stdenv.mkDerivation rec {
inherit bootPkgs targetPrefix;

inherit llvmPackages;
inherit enableShared;

# Our Cabal compiler name
haskellCompilerName = "ghc-8.5";
3 changes: 2 additions & 1 deletion pkgs/development/compilers/ghcjs-ng/default.nix
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ let
inherit (bootGhcjs) version;
isGhcjs = true;

enableShared = true;

socket-io = nodePackages."socket.io";

# Relics of the old GHCJS build system
@@ -96,4 +98,3 @@ in stdenv.mkDerivation {

meta.platforms = passthru.bootPkgs.ghc.meta.platforms;
}

2 changes: 2 additions & 0 deletions pkgs/development/compilers/ghcjs/base.nix
Original file line number Diff line number Diff line change
@@ -179,6 +179,8 @@ in mkDerivation (rec {
# let us assume ghcjs is never actually cross compiled
targetPrefix = "";

enableShared = true;

inherit stage1Packages;
mkStage2 = stage2 {
inherit ghcjsBoot;
2 changes: 1 addition & 1 deletion pkgs/development/haskell-modules/generic-builder.nix
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ in
, profilingDetail ? "all-functions"
# TODO enable shared libs for cross-compiling
, enableSharedExecutables ? false
, enableSharedLibraries ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
, enableSharedLibraries ? (ghc.enableShared or false)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
, enableStaticLibraries ? !hostPlatform.isWindows
, enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
10 changes: 10 additions & 0 deletions pkgs/development/interpreters/erlang/R21.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ mkDerivation, fetchurl }:

mkDerivation rec {
version = "21.0";
sha256 = "0khprgawmbdpn9b8jw2kksmvs6b45mibpjralsc0ggxym1397vm8";

prePatch = ''
substituteInPlace configure.in --replace '`sw_vers -productVersion`' '10.10'
'';
}
14 changes: 12 additions & 2 deletions pkgs/development/mobile/androidenv/androidsdk.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper
{ stdenv, stdenv_32bit, fetchurl, fetchzip, unzip, makeWrapper
, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons, sources
, libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, libGLU_combined, alsaLib
, freetype, fontconfig, glib, gtk2, atk, file, jdk, coreutils, libpulseaudio, dbus
@@ -8,7 +8,15 @@
{ platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false
, useGooglePlayServices ? false, useInstantApps ? false }:

let inherit (stdenv.lib) makeLibraryPath; in
let inherit (stdenv.lib) makeLibraryPath;

googleRepository = let version = "gms_v9_rc41_wear_2_0_rc6";
in fetchzip rec {
url = "https://dl-ssl.google.com/android/repository/google_m2repository_${version}.zip";
sha256 = "0k99xmynv0k62d301zx5jnjkddflr51i5lb02l9incg7m5cn8kzx";
};

in

stdenv.mkDerivation rec {
name = "android-sdk-${version}";
@@ -168,6 +176,8 @@ stdenv.mkDerivation rec {
${stdenv.lib.optionalString useInstantApps
"ln -s ${addons.instant_apps}/whsdk instantapps"}
ln -s ${googleRepository} m2repository
cd ../..
# Symlink required sources
104 changes: 104 additions & 0 deletions pkgs/development/mobile/androidenv/build-gradle-app.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{ stdenv, androidsdk, jdk, androidndk, gnumake, gawk, file
, which, gradle, fetchurl, buildEnv, runCommand }:

args@{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false
, useExtraSupportLibs ? false, useGooglePlayServices ? false
, release ? false, keyStore ? null, keyAlias ? null
, keyStorePassword ? null, keyAliasPassword ? null
, useNDK ? false, buildInputs ? [], mavenDeps, gradleTask
, buildDirectory ? "./.", acceptAndroidSdkLicenses ? false }:

assert release -> keyStore != null;
assert release -> keyAlias != null;
assert release -> keyStorePassword != null;
assert release -> keyAliasPassword != null;
assert acceptAndroidSdkLicenses;

let
inherit (stdenv.lib) optionalString;

m2install = { repo, version, artifactId, groupId
, jarSha256, pomSha256, aarSha256, suffix ? "" }:
let m2Name = "${artifactId}-${version}";
m2Path = "${builtins.replaceStrings ["."] ["/"] groupId}/${artifactId}/${version}";
in runCommand m2Name {} (''
mkdir -p $out/m2/${m2Path}
'' + optionalString (jarSha256 != null) ''
install -D ${fetchurl {
url = "${repo}${m2Path}/${m2Name}${suffix}.jar";
sha256 = jarSha256;
}} $out/m2/${m2Path}/${m2Name}${suffix}.jar
'' + optionalString (pomSha256 != null) ''
install -D ${fetchurl {
url = "${repo}${m2Path}/${m2Name}${suffix}.pom";
sha256 = pomSha256;
}} $out/m2/${m2Path}/${m2Name}${suffix}.pom
'' + optionalString (aarSha256 != null) ''
install -D ${fetchurl {
url = "${repo}${m2Path}/${m2Name}${suffix}.aar";
sha256 = aarSha256;
}} $out/m2/${m2Path}/${m2Name}${suffix}.aar
'');

androidsdkComposition = androidsdk {
inherit platformVersions useGoogleAPIs
useExtraSupportLibs useGooglePlayServices;
abiVersions = [ "armeabi-v7a" ];
};
in
stdenv.mkDerivation ({
name = stdenv.lib.replaceChars [" "] [""] name;

ANDROID_HOME = "${androidsdkComposition}/libexec";
ANDROID_NDK_HOME = "${androidndk}/libexec/${androidndk.name}";

buildInputs = [ jdk gradle ] ++
stdenv.lib.optional useNDK [ androidndk gnumake gawk file which ] ++
buildInputs;

DEPENDENCIES = buildEnv { name = "${name}-maven-deps";
paths = map m2install mavenDeps;
};

buildPhase = ''
${optionalString release ''
# Provide key signing attributes
( echo "RELEASE_STORE_FILE=${keyStore}"
echo "RELEASE_KEY_ALIAS=${keyAlias}"
echo "RELEASE_STORE_PASSWORD=${keyStorePassword}"
echo "RELEASE_KEY_PASSWORD=${keyAliasPassword}"
) >> gradle.properties
''}
buildDir=`pwd`
cp -r $ANDROID_HOME $buildDir/local_sdk
chmod -R 755 local_sdk
export ANDROID_HOME=$buildDir/local_sdk
# Key files cannot be stored in the user's home directory. This
# overrides it.
export ANDROID_SDK_HOME=`pwd`
mkdir -p "$ANDROID_HOME/licenses"
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
export APP_HOME=`pwd`
mkdir -p .m2/repository
if [ -d "$DEPENDENCIES/m2" ] ; then
cp -RL "$DEPENDENCIES"/m2/* .m2/repository/
fi
chmod -R 755 .m2
mkdir -p .m2/repository/com/android/support
cp -RL local_sdk/extras/android/m2repository/com/android/support/* .m2/repository/com/android/support/
cp -RL local_sdk/extras/google/m2repository/* .m2/repository/
gradle ${gradleTask} --offline --no-daemon -g ./tmp -Dmaven.repo.local=`pwd`/.m2/repository
'';

installPhase = ''
mkdir -p $out
mv ${buildDirectory}/build/outputs/apk/*.apk $out
mkdir -p $out/nix-support
echo "file binary-dist \"$(echo $out/*.apk)\"" > $out/nix-support/hydra-build-products
'';
} // builtins.removeAttrs args ["name" "mavenDeps"])
23 changes: 19 additions & 4 deletions pkgs/development/mobile/androidenv/default.nix
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@
, includeSources ? true
}:

# TODO: use callPackage instead of import to avoid so many inherits

rec {
platformTools = import ./platform-tools.nix {
inherit buildPackages pkgs;
@@ -46,11 +48,16 @@ rec {
};

androidsdk = import ./androidsdk.nix {
inherit (pkgs) stdenv fetchurl unzip makeWrapper;
inherit (pkgs) zlib glxinfo freetype fontconfig glib gtk2 atk libGLU_combined file alsaLib jdk coreutils libpulseaudio dbus;
inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst xkeyboardconfig;
inherit (pkgs) stdenv fetchurl unzip makeWrapper zlib
glxinfo freetype fontconfig glib gtk2 atk
libGLU_combined file alsaLib jdk coreutils
libpulseaudio dbus fetchzip;
inherit (pkgs.xorg) libX11 libXext libXrender
libxcb libXau libXdmcp libXtst xkeyboardconfig;

inherit platformTools buildTools support supportRepository platforms sysimages addons sources includeSources;
inherit platformTools buildTools support
supportRepository platforms sysimages
addons sources includeSources;

stdenv_32bit = pkgs_i686.stdenv;
};
@@ -215,6 +222,8 @@ rec {
useInstantApps = true;
};

androidsdk_latest = androidsdk_8_0;

androidndk_10e = import ./androidndk.nix {
inherit (buildPackages)
p7zip makeWrapper;
@@ -296,4 +305,10 @@ rec {
androidndk = androidndk_10e;
targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_10e;
};

buildGradleApp = import ./build-gradle-app.nix {
inherit (pkgs) stdenv jdk gnumake gawk file runCommand
which gradle fetchurl buildEnv;
inherit androidsdk androidndk;
};
}
Loading