uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
121
pkgs/development/compilers/scala/2.x.nix
Normal file
121
pkgs/development/compilers/scala/2.x.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript
|
||||
, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
repo = "git@github.com:scala/scala.git";
|
||||
|
||||
versionMap = {
|
||||
"2.10" = {
|
||||
version = "2.10.7";
|
||||
sha256 = "koMRmRb2u3cU4HaihAzPItWIGbNVIo7RWRrm92kp8RE=";
|
||||
pname = "scala_2_10";
|
||||
};
|
||||
|
||||
"2.11" = {
|
||||
version = "2.11.12";
|
||||
sha256 = "sR19M2mcpPYLw7K2hY/ZU+PeK4UiyUP0zaS2dDFhlqg=";
|
||||
pname = "scala_2_11";
|
||||
};
|
||||
|
||||
"2.12" = {
|
||||
version = "2.12.15";
|
||||
sha256 = "F5RePKlHjQaoQ2BWqsa5r99g3q/cPjgsbAi2A5IberY=";
|
||||
pname = "scala_2_12";
|
||||
};
|
||||
|
||||
"2.13" = {
|
||||
version = "2.13.8";
|
||||
sha256 = "LLMdhGnGUYOfDpyDehqwZVDQMXJnUvVJBr4bneATFM8=";
|
||||
pname = "scala_2_13";
|
||||
};
|
||||
};
|
||||
|
||||
in with versionMap.${majorVersion};
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit version;
|
||||
|
||||
name = "scala-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
inherit sha256;
|
||||
url = "https://www.scala-lang.org/files/archive/scala-${version}.tgz";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jre ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
rm bin/*.bat
|
||||
mv * $out
|
||||
# put docs in correct subdirectory
|
||||
mkdir -p $out/share/doc
|
||||
mv $out/doc $out/share/doc/${name}
|
||||
mv $out/man $out/share/man
|
||||
for p in $(ls $out/bin/) ; do
|
||||
wrapProgram $out/bin/$p \
|
||||
--prefix PATH ":" ${coreutils}/bin \
|
||||
--prefix PATH ":" ${gnugrep}/bin \
|
||||
--prefix PATH ":" ${jre}/bin \
|
||||
--set JAVA_HOME ${jre}
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/scalac -version 2>&1 | grep '^Scala compiler version ${version}'
|
||||
|
||||
echo 'println("foo"*3)' | $out/bin/scala 2>/dev/null | grep "foofoofoo"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update.sh" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
PATH=${
|
||||
lib.makeBinPath [
|
||||
common-updater-scripts
|
||||
coreutils
|
||||
git
|
||||
gnused
|
||||
nix
|
||||
nixfmt
|
||||
]
|
||||
}
|
||||
versionSelect='v${versions.major version}.${versions.minor version}.*'
|
||||
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
|
||||
latestTag="$(git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags ${repo} "$versionSelect" | tail --lines=1 | cut --delimiter='/' --fields=3 | sed 's|^v||g')"
|
||||
if [ "$oldVersion" != "$latestTag" ]; then
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
default_nix="$nixpkgs/pkgs/development/compilers/scala/2.x.nix"
|
||||
update-source-version ${pname} "$latestTag" --version-key=version --print-changes
|
||||
nixfmt "$default_nix"
|
||||
else
|
||||
echo "${pname} is already up-to-date"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A general purpose programming language";
|
||||
longDescription = ''
|
||||
Scala is a general purpose programming language designed to express
|
||||
common programming patterns in a concise, elegant, and type-safe way.
|
||||
It smoothly integrates features of object-oriented and functional
|
||||
languages, enabling Java and other programmers to be more productive.
|
||||
Code sizes are typically reduced by a factor of two to three when
|
||||
compared to an equivalent Java application.
|
||||
'';
|
||||
homepage = "https://www.scala-lang.org/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
branch = versions.majorMinor version;
|
||||
maintainers = [ maintainers.nequissimus ];
|
||||
};
|
||||
}
|
||||
40
pkgs/development/compilers/scala/bare.nix
Normal file
40
pkgs/development/compilers/scala/bare.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, jre, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.1.0";
|
||||
pname = "scala-bare";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/lampepfl/dotty/releases/download/${version}/scala3-${version}.tar.gz";
|
||||
sha256 = "9bsZ2FtIb6AvA3W3r2Vv0dPNicuYjMBz3X48z45Avv8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jre ncurses.dev ] ;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv * $out
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
bin_files=$(find $out/bin -type f ! -name common)
|
||||
for f in $bin_files ; do
|
||||
wrapProgram $f --set JAVA_HOME ${jre} --prefix PATH : '${ncurses.dev}/bin'
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Research platform for new language concepts and compiler technologies for Scala";
|
||||
longDescription = ''
|
||||
Dotty is a platform to try out new language concepts and compiler technologies for Scala.
|
||||
The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals),
|
||||
and try to boil down Scala’s types into a smaller set of more fundamental constructs.
|
||||
The theory behind these constructs is researched in DOT, a calculus for dependent object types.
|
||||
'';
|
||||
homepage = "http://dotty.epfl.ch/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = [maintainers.karolchmist maintainers.virusdave];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/compilers/scala/default.nix
Normal file
24
pkgs/development/compilers/scala/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, fetchurl, makeWrapper, jre, callPackage }:
|
||||
|
||||
let
|
||||
bare = callPackage ./bare.nix {
|
||||
inherit stdenv fetchurl makeWrapper jre;
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "scala";
|
||||
inherit (bare) version;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${bare}/bin/scalac $out/bin/scalac
|
||||
ln -s ${bare}/bin/scaladoc $out/bin/scaladoc
|
||||
ln -s ${bare}/bin/scala $out/bin/scala
|
||||
ln -s ${bare}/bin/common $out/bin/common
|
||||
'';
|
||||
|
||||
inherit (bare) meta;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue