diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-03-28 21:15:15 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-03-28 21:15:15 +0100 |
commit | a36be028f5a5dcc55f488a78fc0f58b4b8e4033c (patch) | |
tree | fee5e8989465811c0472b082260a2d9e91cd334b /pkgs/applications/editors | |
parent | 48a137da7301f3ec5e15f8c32945b64581ef9f70 (diff) | |
parent | 7f4e4b279e729c05f1b18da867c6d2fd2c2ab2f3 (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/android-studio/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/editors/glow/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/editors/nano/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/editors/quartus-prime/default.nix | 121 | ||||
-rw-r--r-- | pkgs/applications/editors/vim/configurable.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/editors/vim/vimacs.nix | 34 |
6 files changed, 133 insertions, 40 deletions
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 573eec8450271..9a476ada2142a 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -18,9 +18,9 @@ let sha256Hash = "072rvh20xkn7izh6f2r2bspy06jrvcibj2hc12hz76m8cwzf4v0m"; }; latestVersion = { # canary & dev - version = "4.1.0.3"; # "Android Studio 4.1 Canary 3" - build = "193.6297379"; - sha256Hash = "0sb8ll9bkkdglq18wvy5hikimhjbpfadjdygx9cd8q545h8dy137"; + version = "4.1.0.4"; # "Android Studio 4.1 Canary 4" + build = "193.6325121"; + sha256Hash = "19b4a03qfljdisn7cw44qzab85hib000m9mgswzssjh6ylkd9arw"; }; in { # Attributes are named by their corresponding release channels diff --git a/pkgs/applications/editors/glow/default.nix b/pkgs/applications/editors/glow/default.nix index 80fdcc8a09c1a..928291940cfe3 100644 --- a/pkgs/applications/editors/glow/default.nix +++ b/pkgs/applications/editors/glow/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub, Security }: +{ lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "glow"; @@ -13,11 +13,9 @@ buildGoModule rec { modSha256 = "0r0yq7kgz7i1wf4gxxihdrn1c8mi4wcyhadncxbln24s9c5apxsf"; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; - buildFlagsArray = [ "-ldflags=" "-X=main.Version=${version}" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Render markdown on the CLI"; homepage = "https://github.com/charmbracelet/glow"; license = licenses.mit; diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix index 4197792d73658..3350f6a3db3e4 100644 --- a/pkgs/applications/editors/nano/default.nix +++ b/pkgs/applications/editors/nano/default.nix @@ -20,11 +20,11 @@ let in stdenv.mkDerivation rec { pname = "nano"; - version = "4.7"; + version = "4.9"; src = fetchurl { url = "mirror://gnu/nano/${pname}-${version}.tar.xz"; - sha256 = "1x9nqy2kgaz6087p63i71gdjsqbdc9jjpx1ymlyclfakvsby3h2q"; + sha256 = "19ik88b3g0d9xwav4hkai2h1acmjy5fdnh21gdc1mjq5s4lrff8f"; }; nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext; diff --git a/pkgs/applications/editors/quartus-prime/default.nix b/pkgs/applications/editors/quartus-prime/default.nix index 6a6ea80ca4589..093635b10e42f 100644 --- a/pkgs/applications/editors/quartus-prime/default.nix +++ b/pkgs/applications/editors/quartus-prime/default.nix @@ -1,25 +1,58 @@ -{ buildFHSUserEnv, makeDesktopItem, stdenv, lib, requireFile, unstick, cycloneVSupport ? true }: +{ buildFHSUserEnv, makeDesktopItem, writeScript, stdenv, lib, requireFile, unstick, + supportedDevices ? [ "Arria II" "Cyclone V" "Cyclone IV" "Cyclone 10 LP" "MAX II/V" "MAX 10 FPGA" ] }: let + deviceIds = { + "Arria II" = "arria_lite"; + "Cyclone V" = "cyclonev"; + "Cyclone IV" = "cyclone"; + "Cyclone 10 LP" = "cyclone10lp"; + "MAX II/V" = "max"; + "MAX 10 FPGA" = "max10"; + }; + + supportedDeviceIds = + assert lib.assertMsg (lib.all (name: lib.hasAttr name deviceIds) supportedDevices) + "Supported devices are: ${lib.concatStringsSep ", " (lib.attrNames deviceIds)}"; + lib.listToAttrs (map (name: { + inherit name; + value = deviceIds.${name}; + }) supportedDevices); + + unsupportedDeviceIds = lib.filterAttrs (name: value: + !(lib.hasAttr name supportedDeviceIds) + ) deviceIds; + quartus = stdenv.mkDerivation rec { version = "19.1.0.670"; - pname = "quartus-prime-lite"; + pname = "quartus-prime-lite-unwrapped"; src = let require = {name, sha256}: requireFile { inherit name sha256; url = "${meta.homepage}/${lib.versions.majorMinor version}/?edition=lite&platform=linux"; }; + + hashes = { + "arria_lite" = "1flj9w0vb2p9f9zll136izr6qvmxn0lg72bvaqxs3sxc9vj06wm1"; + "cyclonev" = "0bqxpvjgph0y6slk0jq75mcqzglmqkm0jsx10y9xz5llm6zxzqab"; + "cyclone" = "0pzs8y4s3snxg4g6lrb21qi88abm48g279xzd98qv17qxb2z82rr"; + "cyclone10lp" = "1ccxq8n20y40y47zddkijcv41w3cddvydddr3m4844q31in3nxha"; + "max" = "1cxzbqscxvlcy74dpqmvlnxjyyxfwcx3spygpvpwi6dfj3ipgm2z"; + "max10" = "14k83javivbk65mpb17wdwsyb8xk7x9gzj9x0wnd24mmijrvdy9s"; + }; + + devicePackages = map (id: { + name = "${id}-${version}.qdz"; + sha256 = lib.getAttr id hashes; + }) (lib.attrValues supportedDeviceIds); in map require ([{ name = "QuartusLiteSetup-${version}-linux.run"; sha256 = "15vxvqxqdk29ahlw3lkm1nzxyhzy4626wb9s5f2h6sjgq64r8m7f"; } { name = "ModelSimSetup-${version}-linux.run"; sha256 = "0j1vfr91jclv88nam2plx68arxmz4g50sqb840i60wqd5b0l3y6r"; - }] ++ lib.optional cycloneVSupport { - name = "cyclonev-${version}.qdz"; - sha256 = "0bqxpvjgph0y6slk0jq75mcqzglmqkm0jsx10y9xz5llm6zxzqab"; - }); + }] ++ devicePackages); nativeBuildInputs = [ unstick ]; @@ -37,27 +70,22 @@ let disabledComponents = [ "quartus_help" "quartus_update" + # not modelsim_ase "modelsim_ae" - # Devices - "arria_lite" - "cyclone" - "cyclone10lp" - "max" - "max10" - ] ++ lib.optional (!cycloneVSupport) "cyclonev"; + ] ++ (lib.attrValues unsupportedDeviceIds); in '' - ${lib.concatMapStringsSep "\n" copyInstaller installers} - ${lib.concatMapStringsSep "\n" copyComponent components} + ${lib.concatMapStringsSep "\n" copyInstaller installers} + ${lib.concatMapStringsSep "\n" copyComponent components} - unstick $TEMP/${(builtins.head installers).name} \ - --disable-components ${lib.concatStringsSep "," disabledComponents} \ - --mode unattended --installdir $out --accept_eula 1 + unstick $TEMP/${(builtins.head installers).name} \ + --disable-components ${lib.concatStringsSep "," disabledComponents} \ + --mode unattended --installdir $out --accept_eula 1 - # This patch is from https://wiki.archlinux.org/index.php/Altera_Design_Software - patch --force --strip 0 --directory $out < ${./vsim.patch} + # This patch is from https://wiki.archlinux.org/index.php/Altera_Design_Software + patch --force --strip 0 --directory $out < ${./vsim.patch} - rm -r $out/uninstall $out/logs - ''; + rm -r $out/uninstall $out/logs + ''; meta = { homepage = "https://fpgasoftware.intel.com"; @@ -69,17 +97,17 @@ let }; desktopItem = makeDesktopItem { - name = quartus.name; + name = "quartus-prime-lite"; exec = "quartus"; icon = "quartus"; desktopName = "Quartus"; - genericName = "Quartus FPGA IDE"; + genericName = "Quartus Prime"; categories = "Development;"; }; # I think modelsim_ase/linux/vlm checksums itself, so use FHSUserEnv instead of `patchelf` -in buildFHSUserEnv { - name = "quartus-prime-lite"; +in buildFHSUserEnv rec { + name = "quartus-prime-lite"; # wrapped targetPkgs = pkgs: with pkgs; [ # quartus requirements @@ -110,10 +138,43 @@ in buildFHSUserEnv { xorg.libXrender ]; - extraInstallCommands = '' - mkdir -p $out/share/applications - cp ${desktopItem}/share/applications/* $out/share/applications + passthru = { + unwrapped = quartus; + }; + + extraInstallCommands = let + quartusExecutables = (map (c: "quartus/bin/quartus_${c}") [ + "asm" "cdb" "cpf" "drc" "eda" "fit" "jbcc" "jli" "map" "pgm" "pow" + "sh" "si" "sim" "sta" "stp" "tan" + ]) ++ [ "quartus/bin/quartus" ]; + + qsysExecutables = map (c: "quartus/sopc_builder/bin/qsys-${c}") [ + "generate" "edit" "script" + ]; + # Should we install all executables ? + modelsimExecutables = map (c: "modelsim_ase/bin/${c}") [ + "vsim" "vlog" "vlib" + ]; + in '' + mkdir -p $out/share/applications $out/share/icons/128x128 + ln -s ${desktopItem}/share/applications/* $out/share/applications + ln -s ${quartus}/licenses/images/dc_quartus_panel_logo.png $out/share/icons/128x128/quartus.png + + mkdir -p $out/quartus/bin $out/quartus/sopc_builder/bin $out/modelsim_ase/bin + WRAPPER=$out/bin/${name} + EXECUTABLES="${lib.concatStringsSep " " (quartusExecutables ++ qsysExecutables ++ modelsimExecutables)}" + for executable in $EXECUTABLES; do + echo "#!${stdenv.shell}" >> $out/$executable + echo "$WRAPPER ${quartus}/$executable \$@" >> $out/$executable + done + + cd $out + chmod +x $EXECUTABLES + # link into $out/bin so executables become available on $PATH + ln --symbolic --relative --target-directory ./bin $EXECUTABLES ''; - runScript = "${quartus}/quartus/bin/quartus"; + runScript = writeScript "${name}-wrapper" '' + exec $@ + ''; } diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index bb3d571e6f865..3b37c805cdd73 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -14,7 +14,7 @@ , features ? "huge" # One of tiny, small, normal, big or huge , wrapPythonDrv ? false -, guiSupport ? config.vim.gui or "gtk3" +, guiSupport ? config.vim.gui or (if stdenv.isDarwin then "gtk2" else "gtk3") , luaSupport ? config.vim.lua or true , perlSupport ? config.vim.perl or false # Perl interpreter , pythonSupport ? config.vim.python or true # Python interpreter diff --git a/pkgs/applications/editors/vim/vimacs.nix b/pkgs/applications/editors/vim/vimacs.nix new file mode 100644 index 0000000000000..d067b4181213d --- /dev/null +++ b/pkgs/applications/editors/vim/vimacs.nix @@ -0,0 +1,34 @@ +{ stdenv, config, vim_configurable, macvim, vimPlugins +, useMacvim ? stdenv.isDarwin && (config.vimacs.macvim or true) +, vimacsExtraArgs ? "" }: + +stdenv.mkDerivation rec { + pname = "vimacs"; + version = vimPackage.version; + vimPackage = if useMacvim then macvim else vim_configurable; + + buildInputs = [ vimPackage vimPlugins.vimacs ]; + + buildCommand = '' + mkdir -p "$out"/bin + cp "${vimPlugins.vimacs}"/share/vim-plugins/vimacs/bin/vim $out/bin/vimacs + substituteInPlace "$out"/bin/vimacs \ + --replace '-vim}' '-@bin@/bin/vim}' \ + --replace '-gvim}' '-@bin@/bin/vim -g}' \ + --replace '--cmd "let g:VM_Enabled = 1"' \ + '--cmd "let g:VM_Enabled = 1" --cmd "set rtp^=@rtp@" ${vimacsExtraArgs}' \ + --replace @rtp@ ${vimPlugins.vimacs.rtp} \ + --replace @bin@ ${vimPackage} + for prog in vm gvm gvimacs vmdiff vimacsdiff + do + ln -s "$out"/bin/vimacs $out/bin/$prog + done + ''; + + meta = with stdenv.lib; { + description = "Vim-Improved eMACS: Emacs emulation for Vim"; + homepage = "http://algorithm.com.au/code/vimacs"; + license = licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ millerjason ]; + }; +} |