Merge master into staging-next
This commit is contained in:
commit
1630ab9b47
21 changed files with 738 additions and 206 deletions
|
@ -5631,6 +5631,12 @@
|
|||
github = "jduan";
|
||||
githubId = 452450;
|
||||
};
|
||||
jdupak = {
|
||||
name = "Jakub Dupak";
|
||||
email = "dev@jakubdupak.com";
|
||||
github = "jdupak";
|
||||
githubId = 22683640;
|
||||
};
|
||||
jecaro = {
|
||||
email = "jeancharles.quillet@gmail.com";
|
||||
github = "jecaro";
|
||||
|
|
|
@ -1374,6 +1374,16 @@
|
|||
warning.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>pomerium-cli</literal> command has been moved out
|
||||
of the <literal>pomerium</literal> package into the
|
||||
<literal>pomerium-cli</literal> package, following upstream’s
|
||||
repository split. If you are using the
|
||||
<literal>pomerium-cli</literal> command, you should now
|
||||
install the <literal>pomerium-cli</literal> package.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The option
|
||||
|
|
|
@ -503,6 +503,11 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
Reason is that the old name has been deprecated upstream.
|
||||
Using the old option name will still work, but produce a warning.
|
||||
|
||||
- The `pomerium-cli` command has been moved out of the `pomerium` package into
|
||||
the `pomerium-cli` package, following upstream's repository split. If you are
|
||||
using the `pomerium-cli` command, you should now install the `pomerium-cli`
|
||||
package.
|
||||
|
||||
- The option
|
||||
[services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock)
|
||||
was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager
|
||||
|
|
|
@ -69,11 +69,16 @@ in
|
|||
CERTIFICATE_KEY_FILE = "key.pem";
|
||||
};
|
||||
startLimitIntervalSec = 60;
|
||||
script = ''
|
||||
if [[ -v CREDENTIALS_DIRECTORY ]]; then
|
||||
cd "$CREDENTIALS_DIRECTORY"
|
||||
fi
|
||||
exec "${pkgs.pomerium}/bin/pomerium" -config "${cfgFile}"
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
StateDirectory = [ "pomerium" ];
|
||||
ExecStart = "${pkgs.pomerium}/bin/pomerium -config ${cfgFile}";
|
||||
|
||||
PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE
|
||||
MemoryDenyWriteExecute = false; # breaks LuaJIT
|
||||
|
@ -99,7 +104,6 @@ in
|
|||
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
||||
|
||||
WorkingDirectory = mkIf (cfg.useACMEHost != null) "$CREDENTIALS_DIRECTORY";
|
||||
LoadCredential = optionals (cfg.useACMEHost != null) [
|
||||
"fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem"
|
||||
"key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem"
|
||||
|
@ -124,7 +128,7 @@ in
|
|||
Type = "oneshot";
|
||||
TimeoutSec = 60;
|
||||
ExecCondition = "/run/current-system/systemd/bin/systemctl -q is-active pomerium.service";
|
||||
ExecStart = "/run/current-system/systemd/bin/systemctl restart pomerium.service";
|
||||
ExecStart = "/run/current-system/systemd/bin/systemctl --no-block restart pomerium.service";
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
37
pkgs/applications/editors/jetbrains/darwin.nix
Normal file
37
pkgs/applications/editors/jetbrains/darwin.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, undmg
|
||||
, ...
|
||||
}:
|
||||
|
||||
{ meta
|
||||
, name
|
||||
, product
|
||||
, productShort ? product
|
||||
, src
|
||||
, version
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
loname = lib.toLower productShort;
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
inherit meta src version;
|
||||
desktopName = product;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
APP_DIR="$out/Applications/${product}.app"
|
||||
mkdir -p "$APP_DIR"
|
||||
cp -Tr "${product}.app" "$APP_DIR"
|
||||
mkdir -p "$out/bin"
|
||||
cat << EOF > "$out/bin/${loname}"
|
||||
open -na '$APP_DIR' --args "\$@"
|
||||
EOF
|
||||
chmod +x "$out/bin/${loname}"
|
||||
runHook postInstall
|
||||
'';
|
||||
nativeBuildInputs = [ undmg ];
|
||||
pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name));
|
||||
sourceRoot = ".";
|
||||
}
|
|
@ -10,7 +10,18 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
mkJetBrainsProduct = callPackage ./common.nix { inherit vmopts; };
|
||||
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
|
||||
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ];
|
||||
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
versions = builtins.fromJSON (readFile (./versions.json));
|
||||
versionKey = if stdenv.isLinux then "linux" else system;
|
||||
products = versions.${versionKey} or (throw "Unsupported system: ${system}");
|
||||
|
||||
package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix;
|
||||
mkJetBrainsProduct = callPackage package { inherit vmopts; };
|
||||
|
||||
# Sorted alphabetically
|
||||
|
||||
buildClion = { name, version, src, license, description, wmClass, ... }:
|
||||
|
@ -19,13 +30,12 @@ let
|
|||
product = "CLion";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/clion/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Enhancing productivity for every C and C++
|
||||
developer on Linux, macOS and Windows.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo mic92 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
|
||||
|
@ -58,14 +68,13 @@ let
|
|||
product = "DataGrip";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/datagrip/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
DataGrip is a new IDE from JetBrains built for database admins.
|
||||
It allows you to quickly migrate and refactor relational databases,
|
||||
construct efficient, statically checked SQL queries and much more.
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -75,7 +84,7 @@ let
|
|||
product = "Goland";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/go/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Goland is the codename for a new commercial IDE by JetBrains
|
||||
aimed at providing an ergonomic environment for Go development.
|
||||
|
@ -83,10 +92,9 @@ let
|
|||
and tool integrations specific for the Go language
|
||||
'';
|
||||
maintainers = [ maintainers.miltador ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postFixup = (attrs.postFixup or "") + ''
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv
|
||||
|
||||
|
@ -98,10 +106,10 @@ let
|
|||
'';
|
||||
});
|
||||
|
||||
buildIdea = { name, version, src, license, description, wmClass, ... }:
|
||||
buildIdea = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "IDEA";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "IDEA";
|
||||
extraLdPath = [ zlib ];
|
||||
extraWrapperArgs = [
|
||||
''--set M2_HOME "${maven}/maven"''
|
||||
|
@ -116,18 +124,18 @@ let
|
|||
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
|
||||
as IntelliJ.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ];
|
||||
platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ];
|
||||
platforms = ideaPlatforms;
|
||||
};
|
||||
});
|
||||
|
||||
buildMps = { name, version, src, license, description, wmClass, ... }:
|
||||
buildMps = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct rec {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "MPS";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "MPS";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/mps/";
|
||||
inherit license description;
|
||||
inherit license description platforms;
|
||||
longDescription = ''
|
||||
A metaprogramming system which uses projectional editing
|
||||
which allows users to overcome the limits of language
|
||||
|
@ -135,7 +143,6 @@ let
|
|||
diagrams.
|
||||
'';
|
||||
maintainers = with maintainers; [ rasendubi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -145,24 +152,23 @@ let
|
|||
product = "PhpStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/phpstorm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
PhpStorm provides an editor for PHP, HTML and JavaScript
|
||||
with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for PHP and JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ schristo ma27 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
buildPycharm = { name, version, src, license, description, wmClass, ... }:
|
||||
buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "PyCharm";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "PyCharm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/pycharm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Python IDE with complete set of tools for productive
|
||||
development with Python programming language. In addition, the
|
||||
|
@ -177,11 +183,8 @@ let
|
|||
and productive development!
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).override {
|
||||
propagatedUserEnvPkgs = [ python3 ];
|
||||
};
|
||||
});
|
||||
|
||||
buildRider = { name, version, src, license, description, wmClass, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
|
@ -189,7 +192,7 @@ let
|
|||
product = "Rider";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/rider/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
JetBrains Rider is a new .NET IDE based on the IntelliJ
|
||||
platform and ReSharper. Rider supports .NET Core,
|
||||
|
@ -199,7 +202,6 @@ let
|
|||
ASP.NET Core web applications.
|
||||
'';
|
||||
maintainers = [ maintainers.miltador ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
|
||||
|
@ -215,10 +217,9 @@ let
|
|||
product = "RubyMine";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/ruby/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = description;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -228,14 +229,13 @@ let
|
|||
product = "WebStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/webstorm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
|
||||
and CSS with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ abaldeau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) ''
|
||||
|
@ -244,6 +244,7 @@ let
|
|||
rm -r jbr
|
||||
'';
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -251,12 +252,12 @@ in
|
|||
|
||||
clion = buildClion rec {
|
||||
name = "clion-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.clion.version;
|
||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||
sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */
|
||||
url = products.clion.url;
|
||||
sha256 = products.clion.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-clion";
|
||||
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
||||
|
@ -264,12 +265,12 @@ in
|
|||
|
||||
datagrip = buildDataGrip rec {
|
||||
name = "datagrip-${version}";
|
||||
version = "2021.3.4"; /* updated by script */
|
||||
version = products.datagrip.version;
|
||||
description = "Your Swiss Army Knife for Databases and SQL";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
|
||||
sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */
|
||||
url = products.datagrip.url;
|
||||
sha256 = products.datagrip.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-datagrip";
|
||||
update-channel = "DataGrip RELEASE";
|
||||
|
@ -277,12 +278,12 @@ in
|
|||
|
||||
goland = buildGoland rec {
|
||||
name = "goland-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.goland.version;
|
||||
description = "Up and Coming Go IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
||||
sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */
|
||||
url = products.goland.url;
|
||||
sha256 = products.goland.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-goland";
|
||||
update-channel = "GoLand RELEASE";
|
||||
|
@ -290,12 +291,13 @@ in
|
|||
|
||||
idea-community = buildIdea rec {
|
||||
name = "idea-community-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "IntelliJ IDEA CE";
|
||||
version = products.idea-community.version;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||
sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */
|
||||
url = products.idea-community.url;
|
||||
sha256 = products.idea-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea-ce";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -303,12 +305,13 @@ in
|
|||
|
||||
idea-ultimate = buildIdea rec {
|
||||
name = "idea-ultimate-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "IntelliJ IDEA";
|
||||
version = products.idea-ultimate.version;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
||||
sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */
|
||||
url = products.idea-ultimate.url;
|
||||
sha256 = products.idea-ultimate.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -316,13 +319,13 @@ in
|
|||
|
||||
mps = buildMps rec {
|
||||
name = "mps-${version}";
|
||||
version = "2021.3"; /* updated by script */
|
||||
versionMajorMinor = "2021.3"; /* updated by script */
|
||||
product = "MPS ${products.mps.version-major-minor}";
|
||||
version = products.mps.version;
|
||||
description = "Create your own domain-specific language";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz";
|
||||
sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */
|
||||
url = products.mps.url;
|
||||
sha256 = products.mps.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-mps";
|
||||
update-channel = "MPS RELEASE";
|
||||
|
@ -330,12 +333,12 @@ in
|
|||
|
||||
phpstorm = buildPhpStorm rec {
|
||||
name = "phpstorm-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.phpstorm.version;
|
||||
description = "Professional IDE for Web and PHP developers";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||
sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */
|
||||
url = products.phpstorm.url;
|
||||
sha256 = products.phpstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-phpstorm";
|
||||
update-channel = "PhpStorm RELEASE";
|
||||
|
@ -343,12 +346,13 @@ in
|
|||
|
||||
pycharm-community = buildPycharm rec {
|
||||
name = "pycharm-community-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "PyCharm CE";
|
||||
version = products.pycharm-community.version;
|
||||
description = "PyCharm Community Edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */
|
||||
url = products.pycharm-community.url;
|
||||
sha256 = products.pycharm-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm-ce";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -356,12 +360,13 @@ in
|
|||
|
||||
pycharm-professional = buildPycharm rec {
|
||||
name = "pycharm-professional-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "PyCharm";
|
||||
version = products.pycharm-professional.version;
|
||||
description = "PyCharm Professional Edition";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */
|
||||
url = products.pycharm-professional.url;
|
||||
sha256 = products.pycharm-professional.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -369,12 +374,12 @@ in
|
|||
|
||||
rider = buildRider rec {
|
||||
name = "rider-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.rider.version;
|
||||
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
|
||||
sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */
|
||||
url = products.rider.url;
|
||||
sha256 = products.rider.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rider";
|
||||
update-channel = "Rider RELEASE";
|
||||
|
@ -382,12 +387,12 @@ in
|
|||
|
||||
ruby-mine = buildRubyMine rec {
|
||||
name = "ruby-mine-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.ruby-mine.version;
|
||||
description = "The Most Intelligent Ruby and Rails IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||
sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */
|
||||
url = products.ruby-mine.url;
|
||||
sha256 = products.ruby-mine.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rubymine";
|
||||
update-channel = "RubyMine RELEASE";
|
||||
|
@ -395,12 +400,12 @@ in
|
|||
|
||||
webstorm = buildWebStorm rec {
|
||||
name = "webstorm-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.webstorm.version;
|
||||
description = "Professional IDE for Web and JavaScript development";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
||||
sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */
|
||||
url = products.webstorm.url;
|
||||
sha256 = products.webstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-webstorm";
|
||||
update-channel = "WebStorm RELEASE";
|
||||
|
|
|
@ -3,17 +3,15 @@
|
|||
, vmopts ? null
|
||||
}:
|
||||
|
||||
{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
|
||||
{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
|
||||
|
||||
with lib;
|
||||
|
||||
let loName = toLower product;
|
||||
hiName = toUpper product;
|
||||
let loName = toLower productShort;
|
||||
hiName = toUpper productShort;
|
||||
mainProgram = concatStringsSep "-" (init (splitString "-" name));
|
||||
vmoptsName = loName
|
||||
+ ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
|
||||
then ""
|
||||
else "64" )
|
||||
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
|
||||
+ ".vmoptions";
|
||||
in
|
||||
|
||||
|
@ -36,7 +34,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper patchelf unzip ];
|
||||
|
||||
postPatch = lib.optionalString (!stdenv.isDarwin) ''
|
||||
postPatch = ''
|
||||
get_file_size() {
|
||||
local fname="$1"
|
||||
echo $(ls -l $fname | cut -d ' ' -f5)
|
||||
|
@ -73,7 +71,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
item=${desktopItem}
|
||||
|
||||
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
|
||||
--prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
|
||||
# Some internals want libstdc++.so.6
|
||||
stdenv.cc.cc.lib libsecret e2fsprogs
|
|
@ -1,101 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i perl -p perl perlPackages.LWPProtocolHttps perlPackages.FileSlurp
|
||||
|
||||
use strict;
|
||||
use List::Util qw(reduce);
|
||||
use File::Slurp;
|
||||
use LWP::Simple;
|
||||
|
||||
my $only_free = grep { $_ eq "--only-free" } @ARGV;
|
||||
|
||||
sub semantic_less {
|
||||
my ($a, $b) = @_;
|
||||
$a =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
|
||||
$b =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
|
||||
return $a lt $b;
|
||||
}
|
||||
|
||||
sub get_latest_versions {
|
||||
my @channels = get("https://www.jetbrains.com/updates/updates.xml") =~ /(<channel .+?<\/channel>)/gs;
|
||||
my %h = {};
|
||||
for my $ch (@channels) {
|
||||
my ($id) = $ch =~ /^<channel id="[^"]+" name="([^"]+)"/;
|
||||
my @builds = $ch =~ /(<build .+?<\/build>)/gs;
|
||||
my $latest_build = reduce {
|
||||
my ($aversion) = $a =~ /^<build [^>]*version="([^"]+)"/; die "no version in $a" unless $aversion;
|
||||
my ($bversion) = $b =~ /^<build [^>]*version="([^"]+)"/; die "no version in $b" unless $bversion;
|
||||
semantic_less($aversion, $bversion) ? $b : $a;
|
||||
} @builds;
|
||||
next unless $latest_build;
|
||||
|
||||
# version as in download url
|
||||
my ($version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
|
||||
my ($fullNumber) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/;
|
||||
my $latest_version_full1 = "$version-$fullNumber";
|
||||
$latest_version_full1 =~ s/\s*EAP//;
|
||||
|
||||
my ($latest_version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
|
||||
($latest_version) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/ if $latest_version =~ / /;
|
||||
|
||||
$h{$id} = $latest_version;
|
||||
$h{"full1_" . $id} = $latest_version_full1;
|
||||
}
|
||||
return %h;
|
||||
}
|
||||
|
||||
my %latest_versions = get_latest_versions();
|
||||
# for my $ch (sort keys %latest_versions) {
|
||||
# print("$ch $latest_versions{$ch}\n");
|
||||
# }
|
||||
|
||||
sub update_nix_block {
|
||||
my ($block) = @_;
|
||||
my ($channel) = $block =~ /update-channel\s*=\s*"([^"]+)"/;
|
||||
if ($channel) {
|
||||
if ($latest_versions{$channel}) {
|
||||
my ($version) = $block =~ /version\s*=\s*"([^"]+)"/;
|
||||
die "no version in $block" unless $version;
|
||||
if ($version eq $latest_versions{$channel}) {
|
||||
print("$channel is up to date at $version\n");
|
||||
} elsif ($only_free && $block =~ /licenses\.unfree/) {
|
||||
print("$channel is unfree, skipping\n");
|
||||
} else {
|
||||
my $version_string = $latest_versions{$channel};
|
||||
my $versionMajorMinor = $version_string =~ s/^([0-9]+[.][0-9]+).*/$1/r;
|
||||
|
||||
print("updating $channel: $version -> $version_string\n");
|
||||
my ($url) = $block =~ /url\s*=\s*"([^"]+)"/;
|
||||
# try to interpret some nix
|
||||
my ($name) = $block =~ /name\s*=\s*"([^"]+)"/;
|
||||
$name =~ s/\$\{version\}/$version_string/;
|
||||
# Some url pattern contain variables more than once
|
||||
$url =~ s/\$\{name\}/$name/g;
|
||||
$url =~ s/\$\{version\}/$version_string/g;
|
||||
$url =~ s/\$\{versionMajorMinor\}/$versionMajorMinor/g;
|
||||
die "$url still has some interpolation" if $url =~ /\$/;
|
||||
my ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
|
||||
unless ( $sha256 ) {
|
||||
my $full_version = $latest_versions{"full1_" . $channel};
|
||||
$url =~ s/$version_string/$full_version/;
|
||||
($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
|
||||
$version_string = $full_version;
|
||||
}
|
||||
die "invalid sha256 in $url.sha256" unless $sha256;
|
||||
my ($sha256Base32) = readpipe("nix-hash --type sha256 --to-base32 $sha256");
|
||||
chomp $sha256Base32;
|
||||
print "Jetbrains published SHA256: $sha256\n";
|
||||
print "Conversion into base32 yields: $sha256Base32\n";
|
||||
$block =~ s#version\s*=\s*"([^"]+)".+$#version = "$version_string"; /* updated by script */#m;
|
||||
$block =~ s#versionMajorMinor\s*=\s*"([^"]+)".+$#versionMajorMinor = "$versionMajorMinor"; /* updated by script */#m;
|
||||
$block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256Base32"; /* updated by script */#m;
|
||||
}
|
||||
} else {
|
||||
warn "unknown update-channel $channel";
|
||||
}
|
||||
}
|
||||
return $block;
|
||||
}
|
||||
|
||||
my $nix = read_file 'default.nix';
|
||||
$nix =~ s/(= build\w+ rec \{.+?\n \};\n)/update_nix_block($1)/gse;
|
||||
write_file 'default.nix', $nix;
|
97
pkgs/applications/editors/jetbrains/update.py
Executable file
97
pkgs/applications/editors/jetbrains/update.py
Executable file
|
@ -0,0 +1,97 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p python3 python3.pkgs.packaging python3.pkgs.requests python3.pkgs.xmltodict
|
||||
import hashlib
|
||||
import json
|
||||
import pathlib
|
||||
import logging
|
||||
import requests
|
||||
import sys
|
||||
import xmltodict
|
||||
from packaging import version
|
||||
|
||||
updates_url = "https://www.jetbrains.com/updates/updates.xml"
|
||||
versions_file_path = pathlib.Path(__file__).parent.joinpath("versions.json").resolve()
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
|
||||
|
||||
|
||||
def one_or_more(x):
|
||||
return x if isinstance(x, list) else [x]
|
||||
|
||||
|
||||
def download_channels():
|
||||
logging.info("Checking for updates from %s", updates_url)
|
||||
updates_response = requests.get(updates_url)
|
||||
updates_response.raise_for_status()
|
||||
root = xmltodict.parse(updates_response.text)
|
||||
products = root["products"]["product"]
|
||||
return {
|
||||
channel["@name"]: channel
|
||||
for product in products
|
||||
for channel in one_or_more(product["channel"])
|
||||
}
|
||||
|
||||
|
||||
def build_version(build):
|
||||
return version.parse(build["@version"])
|
||||
|
||||
|
||||
def latest_build(channel):
|
||||
builds = one_or_more(channel["build"])
|
||||
latest = max(builds, key=build_version)
|
||||
return latest
|
||||
|
||||
|
||||
def download_sha256(url):
|
||||
download_response = requests.get(url)
|
||||
download_response.raise_for_status()
|
||||
h = hashlib.sha256()
|
||||
h.update(download_response.content)
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
channels = download_channels()
|
||||
|
||||
|
||||
def update_product(name, product):
|
||||
update_channel = product["update-channel"]
|
||||
logging.info("Updating %s", name)
|
||||
channel = channels.get(update_channel)
|
||||
if channel is None:
|
||||
logging.error("Failed to find channel %s.", update_channel)
|
||||
logging.error("Check that the update-channel in %s matches the name in %s", versions_file_path, updates_url)
|
||||
else:
|
||||
try:
|
||||
build = latest_build(channel)
|
||||
version = build["@version"]
|
||||
parsed_version = build_version(build)
|
||||
version_major_minor = f"{parsed_version.major}.{parsed_version.minor}"
|
||||
download_url = product["url-template"].format(version = version, versionMajorMinor = version_major_minor)
|
||||
product["url"] = download_url
|
||||
product["version-major-minor"] = version_major_minor
|
||||
if "sha256" not in product or product.get("version") != version:
|
||||
logging.info("Found a newer version %s.", version)
|
||||
product["version"] = version
|
||||
product["sha256"] = download_sha256(download_url)
|
||||
else:
|
||||
logging.info("Already at the latest version %s.", version)
|
||||
except Exception as e:
|
||||
logging.exception("Update failed:", exc_info=e)
|
||||
logging.warning("Skipping %s due to the above error.", name)
|
||||
logging.warning("It may be out-of-date. Fix the error and rerun.")
|
||||
|
||||
|
||||
def update_products(products):
|
||||
for name, product in products.items():
|
||||
update_product(name, product)
|
||||
|
||||
|
||||
with open(versions_file_path, "r") as versions_file:
|
||||
versions = json.load(versions_file)
|
||||
|
||||
for products in versions.values():
|
||||
update_products(products)
|
||||
|
||||
with open(versions_file_path, "w") as versions_file:
|
||||
json.dump(versions, versions_file, indent=2)
|
||||
versions_file.write("\n")
|
296
pkgs/applications/editors/jetbrains/versions.json
Normal file
296
pkgs/applications/editors/jetbrains/versions.json
Normal file
|
@ -0,0 +1,296 @@
|
|||
{
|
||||
"linux": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "35986be8adfe0a291a0d2d550c1bf4861ae6c33ecbc71198a472e0ac01a0f10d",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.tar.gz",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "a34670f1a6c77e00237302a70f22fb5bf089dfe128341fd89b2f25bb8becb325",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "9d2b709703516eddeb7f4d6568a7de2e268de4258c7bc7787baee806fbaee4a3",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "99e2225846d118e3190023abc65c8b2c62a1d1463f601c79a20b9494c54a08c9",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-no-jbr.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "face5d154a2c9244b278bfc6dca37218ae3344090526a0679086eff9b0c56670",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-no-jbr.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}.tar.gz",
|
||||
"version": "2021.3",
|
||||
"sha256": "e9aeb62f0d667dd285f808e3ba308f572797dbf11d51e9aa06cf49481bee857f",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "761b347142035e8b74cc5a9939100af9d45f1f6ee29de1e78cd6b1ff06fe20e2",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "f1ae01f471d01c6f09aab0a761c6dea9834ef584f2aaf6d6ebecdce6b55a66e8",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "6bd9573a84c1f2ae6b9b6612f0859aee21133f479ace43602dc0af879f9d9e67",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "1dc57d5d7932d4a8dea51fc5cbdaa52f9626490092978f02fa15bb41cb84068f",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "697510ee2401bb7cbe75193f015d8c2dd1677117defbc2a6f5f3c1443f20dea2",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "18a53c1b1b92e9b7e516b425a390f23f46b880a704d1cb223d1ba64410b15060",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "342a4d8549ae4623a5edfa7f9737887cf0a25c1a61bb414b54b742b1c5a1a84d",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.dmg",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "27e709d2ced66d37a615d8c56885828e49a08962708e28df1a20f324c626bf52",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "4b245b6fe0cf588adbf36e68f12397d5fd311b0b6d49f17ba374ebaa10d207c9",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "20d8cee2bbedaeb0ea388f795e13d08eca5b59e59d4e980ac2d8bc07c9fed3e9",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "9f574562b866e6ccc3d2f9b4c245c45844d1d0fd54be3dbdcc893d40ba1cf54a",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos.dmg",
|
||||
"version": "2021.3",
|
||||
"sha256": "2c5517518fec31ac960e4309fa848ad831f9048ef15df1b362e12aa8f41d9dbd",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "596a9d5fdc30d5fba65ddd482da90f9d555fed748b930587562022bfe7df4e14",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "b8f41f5dddeda0ed5f5c81ba57d2560ccc6e227987882fb6bf305b5d1d8c6909",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "188b998660e7cfb7ac1364c818c008a5608ab2aeb17c6cc19d1d9dda547d3775",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "41a0939cb6258a0fb303268c5a466a663cf3588af14bcbb351be4c3a1d158094",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "ba27c14b21d66ca96a64ceb7dc5d9f0952254a5f405b3201f51d2ad3cc749a96",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "932d4920f831d1ceae68a474444c37d986277d8d3288d3aab93dd43d99336a36",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
},
|
||||
"aarch64-darwin": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "fbf651fa4a5925fe729be30ca8a6fa3be84dc4d7827dbcf74f4d28c52b903cc2",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}-aarch64.dmg",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "7a77ba9fce56c781ae6a4fc65eaab4bcc10780b6bd679b04d74146719e42890a",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "54397d48e20fb534206e13f84b35868b1eaea13175176487b1239b23db4e13db",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "79e540fb0cd480837b3a954e4802f4f252073955393e8927c9c1b28c37112d51",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "511c6aed9c5cd4c7665a9bac9ba94582977013244cbe88b820eb5464fce91a1c",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos-aarch64.dmg",
|
||||
"version": "2021.3",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos-aarch64.dmg",
|
||||
"sha256": "3ace6d45db718dffd80bf126a76735fb65099de292112a01cc078aa61c475a70",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "ba15c3f843c85141a9adaec1c4611224a853bd98649148751e34ac304591a314",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "407bf395cfb6d61f1c0861c7679b197238780e82a019e10162b8cd7130edb15a",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "12fa34d1e60a555bac230acea9cd46c7adfe9ca42ff3e458c79d33e5b88eb8db",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "65603860d1fd3134c5659f5a06de7cac17f3183a01056b79cfe72242b99adb37",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "33773222b2fa14300de5ed12ca96c3442b933f66cef67cebc9610e5cef51c75e",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "f4788ec0c55123b1f4e14934792f65bf8040e2a2ee673e985b50b8feded60408",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook, qtbase }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "QtRVSim";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cvut";
|
||||
repo = "qtrvsim";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "AOksVS0drIBnK4RCxZw40yVxf4E8GjG9kU0rIZsY9gA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "RISC-V CPU simulator for education purposes";
|
||||
longDescription = ''
|
||||
RISC-V CPU simulator for education purposes with pipeline and cache visualization.
|
||||
Developed at FEE CTU for computer architecture classes.
|
||||
'';
|
||||
homepage = "https://github.com/cvut/qtrvsim";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ jdupak ];
|
||||
mainProgram = "qtrvsim_gui";
|
||||
};
|
||||
}
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
|||
sourceRoot = ".";
|
||||
src = dlbin {
|
||||
x86_64-linux = "sha256-yeWVsrvH3yYlS2uH/TkSleHjXvIDnHWcZSvLgV+CGF0=";
|
||||
aarch64-linux = "sha256-75UC+HeVUfUk1HRvTJsOHbHHkgr6me1OtxDF7lahf68=";
|
||||
aarch64-linux = "sha256-9ggRmijwXE9adVFv5XommgvdpeeWnWUFES+Ep2GrBVo=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
|
49
pkgs/applications/virtualization/flintlock/default.nix
Normal file
49
pkgs/applications/virtualization/flintlock/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ lib
|
||||
, cni-plugins
|
||||
, buildGoModule
|
||||
, firecracker
|
||||
, containerd
|
||||
, runc
|
||||
, makeWrapper
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule rec{
|
||||
pname = "flintlock";
|
||||
version = "0.1.0-alpha.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "weaveworks";
|
||||
repo = "flintlock";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Xw3g2wh0fPUknSuAKoJL3jxVZS50wSPZ9Wz05zkTVXM=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-EjVlM6AD+O/z6+R5TRBmmRWbrP4C+qyvsnEjwOkDkUE=";
|
||||
|
||||
subPackages = [ "cmd/flintlock-metrics" "cmd/flintlockd" ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X github.com/weaveworks/flintlock/internal/version.Version=v${version}" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
firecracker
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
for prog in flintlockd flintlock-metrics; do
|
||||
wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ cni-plugins firecracker containerd runc ]}
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Create and manage the lifecycle of MicroVMs backed by containerd";
|
||||
homepage = "https://github.com/weaveworks/flintlock";
|
||||
license = licenses.mpl20;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ techknowlogick ];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook
|
||||
, bash, fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, autoreconfHook
|
||||
, bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
||||
, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst
|
||||
, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
|
||||
, libdrm, udev
|
||||
|
@ -8,13 +8,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "open-vm-tools";
|
||||
version = "11.3.5";
|
||||
version = "12.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmware";
|
||||
repo = "open-vm-tools";
|
||||
rev = "stable-${version}";
|
||||
sha256 = "03fahljrijq4ij8a4v8d7806mpf22ppkgr61n5s974g3xfdvpl13";
|
||||
sha256 = "sha256-agWTGf8x6bxZ7S5bU2scHt8IdLLe/hZdaEMfHIK9d8U=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/open-vm-tools";
|
||||
|
@ -22,10 +22,24 @@ stdenv.mkDerivation rec {
|
|||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
||||
buildInputs = [ fuse glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
|
||||
buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
|
||||
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
||||
|
||||
patches = [
|
||||
# glibc 2.35 and GCC 11 & 12 reporting possible array bounds overflow
|
||||
# Will be fixed in the release after 12.0.0
|
||||
(fetchpatch {
|
||||
url = "https://github.com/vmware/open-vm-tools/commit/de6d129476724668b8903e2a87654f50ba21b1b2.patch";
|
||||
sha256 = "1cqhm868g40kcp8qzzwq10zd4bah9ypaw1qawnli5d240mlkpfhh";
|
||||
})
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
cd open-vm-tools
|
||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
|
||||
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
||||
sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
|
||||
|
@ -43,6 +57,7 @@ stdenv.mkDerivation rec {
|
|||
"--without-kernel-modules"
|
||||
"--without-xmlsecurity"
|
||||
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
||||
"--with-fuse=fuse3"
|
||||
] ++ lib.optional (!withX) "--without-x";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "v2ray-geoip";
|
||||
version = "202203020509";
|
||||
version = "202203100039";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "v2fly";
|
||||
repo = "geoip";
|
||||
rev = "9dce4df2c1f409bad67f579910a4edf522251e7b";
|
||||
sha256 = "sha256-fR0lzvVQjWA3KbzLhuvoB15Z+7RAv34Wf5W7KRZ//QA=";
|
||||
rev = "564c2c8de36d3680a1d5f209d6bb05e4f3f70dfc";
|
||||
sha256 = "sha256-JPpzIppgKQox8T6VC/kzhpLy+YAcuHdH5L6zqciOXow=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -83,9 +83,9 @@ builder rec {
|
|||
# Explicitly link against libgcc_s, to work around the infamous
|
||||
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
||||
|
||||
# don't have "libgcc_s.so.1" on darwin
|
||||
# don't have "libgcc_s.so.1" on clang
|
||||
LDFLAGS = lib.optionalString
|
||||
(!stdenv.isDarwin && !stdenv.hostPlatform.isStatic) "-lgcc_s";
|
||||
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
|
||||
|
||||
configureFlags = [
|
||||
"--with-libreadline-prefix=${lib.getDev readline}"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
, pkg-config
|
||||
, pkgsBuildBuild
|
||||
, readline
|
||||
, writeScript
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -24,11 +25,11 @@ let
|
|||
in
|
||||
builder rec {
|
||||
pname = "guile";
|
||||
version = "3.0.7";
|
||||
version = "3.0.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-9X2GxwYgJxv863qb4MgXRKAz8IrcfOuoMsmRerPmkbc=";
|
||||
sha256 = "sha256-2qcGClbygE6bdMjX5/6L7tErQ6qyeJo4WFGD/MF7ihM=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "info" ];
|
||||
|
@ -81,9 +82,9 @@ builder rec {
|
|||
# Explicitly link against libgcc_s, to work around the infamous
|
||||
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
||||
|
||||
# don't have "libgcc_s.so.1" on darwin
|
||||
# don't have "libgcc_s.so.1" on clang
|
||||
LDFLAGS = lib.optionalString
|
||||
(!stdenv.isDarwin && !stdenv.hostPlatform.isStatic) "-lgcc_s";
|
||||
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
|
||||
|
||||
configureFlags = [
|
||||
"--with-libreadline-prefix=${lib.getDev readline}"
|
||||
|
@ -102,7 +103,10 @@ builder rec {
|
|||
]
|
||||
# Disable JIT on Apple Silicon, as it is not yet supported
|
||||
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44505";
|
||||
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no";
|
||||
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no"
|
||||
# At least on x86_64-darwin '-flto' autodetection is not correct:
|
||||
# https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028
|
||||
++ lib.optional (stdenv.isDarwin) "--disable-lto";
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
|
||||
|
@ -126,6 +130,20 @@ builder rec {
|
|||
|
||||
setupHook = ./setup-hook-3.0.sh;
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-guile-3" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl pcre common-updater-scripts
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
# Expect the text in format of '"https://ftp.gnu.org/gnu/guile/guile-3.0.8.tar.gz"'
|
||||
new_version="$(curl -s https://www.gnu.org/software/guile/download/ |
|
||||
pcregrep -o1 '"https://ftp.gnu.org/gnu/guile/guile-(3[.0-9]+).tar.gz"')"
|
||||
update-source-version ${pname} "$new_version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/guile/";
|
||||
description = "Embeddable Scheme implementation";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
, envoy
|
||||
, zip
|
||||
, nixosTests
|
||||
, pomerium-cli
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -11,18 +12,17 @@ let
|
|||
in
|
||||
buildGoModule rec {
|
||||
pname = "pomerium";
|
||||
version = "0.15.7";
|
||||
version = "0.17.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pomerium";
|
||||
repo = "pomerium";
|
||||
rev = "v${version}";
|
||||
hash = "sha256:0adlk4ylny1z43x1dw3ny0s1932vhb61hpf5wdz4r65y8k9qyfgr";
|
||||
hash = "sha256:1hv76i6k9f0kp527nxlxqhklsvkh2cmfnqlszmlk2hxij31qnf8q";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256:1fszfbra84pcs8v1h2kf7iy603vf9v2ysg6il76aqmqrxmb1p7nv";
|
||||
vendorSha256 = "sha256:1cq4m5a7z64yg3v1c68d15ilw78il6p53vaqzxgn338zjggr3kig";
|
||||
subPackages = [
|
||||
"cmd/pomerium"
|
||||
"cmd/pomerium-cli"
|
||||
];
|
||||
|
||||
ldflags = let
|
||||
|
@ -74,11 +74,11 @@ buildGoModule rec {
|
|||
|
||||
installPhase = ''
|
||||
install -Dm0755 $GOPATH/bin/pomerium $out/bin/pomerium
|
||||
install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) pomerium;
|
||||
inherit pomerium-cli;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sockperf";
|
||||
version = "3.7";
|
||||
version = "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Mellanox";
|
||||
repo = "sockperf";
|
||||
rev = version;
|
||||
sha256 = "MtpV21lCEAv7ARxk0dAxoOxxlqDM+skdQnPlqOvksjw=";
|
||||
sha256 = "sha256-S5ZSGctOOnMD+AqlSAkRHMW8O1Rt8/952fali0kv/EU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook doxygen ];
|
||||
|
|
58
pkgs/tools/security/pomerium-cli/default.nix
Normal file
58
pkgs/tools/security/pomerium-cli/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, pomerium
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) concatStringsSep concatMap id mapAttrsToList;
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "pomerium-cli";
|
||||
version = pomerium.version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "pomerium";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256:0230b22xjnpykj8bcdahzzlsvlrd63z2cmg6yb246c5ngjs835q1";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256:0xx22lmh6wip1d1bjrp4lgab3q9yilw54v4lg24lf3xhbsr5si9b";
|
||||
subPackages = [
|
||||
"cmd/pomerium-cli"
|
||||
];
|
||||
|
||||
ldflags = let
|
||||
# Set a variety of useful meta variables for stamping the build with.
|
||||
setVars = {
|
||||
"github.com/pomerium/cli/version" = {
|
||||
Version = "v${version}";
|
||||
BuildMeta = "nixpkgs";
|
||||
ProjectName = "pomerium-cli";
|
||||
ProjectURL = "github.com/pomerium/cli";
|
||||
};
|
||||
};
|
||||
concatStringsSpace = list: concatStringsSep " " list;
|
||||
mapAttrsToFlatList = fn: list: concatMap id (mapAttrsToList fn list);
|
||||
varFlags = concatStringsSpace (
|
||||
mapAttrsToFlatList (package: packageVars:
|
||||
mapAttrsToList (variable: value:
|
||||
"-X ${package}.${variable}=${value}"
|
||||
) packageVars
|
||||
) setVars);
|
||||
in [
|
||||
"${varFlags}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pomerium.io";
|
||||
description = "Client-side helper for Pomerium authenticating reverse proxy";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ lukegb ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -5548,6 +5548,8 @@ with pkgs;
|
|||
|
||||
flawfinder = callPackage ../development/tools/flawfinder { };
|
||||
|
||||
flintlock = callPackage ../applications/virtualization/flintlock { };
|
||||
|
||||
flip-link = callPackage ../development/tools/flip-link { };
|
||||
|
||||
flips = callPackage ../tools/compression/flips { };
|
||||
|
@ -21617,6 +21619,7 @@ with pkgs;
|
|||
pflogsumm = callPackage ../servers/mail/postfix/pflogsumm.nix { };
|
||||
|
||||
pomerium = callPackage ../servers/http/pomerium { };
|
||||
pomerium-cli = callPackage ../tools/security/pomerium-cli { };
|
||||
|
||||
postgrey = callPackage ../servers/mail/postgrey { };
|
||||
|
||||
|
@ -33805,6 +33808,8 @@ with pkgs;
|
|||
|
||||
qMasterPassword = libsForQt5.callPackage ../applications/misc/qMasterPassword { };
|
||||
|
||||
qtrvsim = libsForQt5.callPackage ../applications/science/computer-architecture/qtrvsim { };
|
||||
|
||||
py-wmi-client = callPackage ../tools/networking/py-wmi-client { };
|
||||
|
||||
qdl = callPackage ../tools/misc/qdl { };
|
||||
|
|
Loading…
Reference in a new issue