diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9acd060ff998..7eb2f0d8e4ed 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2278,13 +2278,6 @@ githubId = 19501722; keys = [ { fingerprint = "C593 27B5 9D0F 2622 23F6 1D03 C1C0 F299 52BC F558"; } ]; }; - bb010g = { - email = "me@bb010g.com"; - matrix = "@bb010g:matrix.org"; - github = "bb010g"; - githubId = 340132; - name = "Brayden Banks"; - }; bb2020 = { github = "bb2020"; githubId = 19290397; diff --git a/pkgs/applications/version-management/git-my/default.nix b/pkgs/applications/version-management/git-my/default.nix deleted file mode 100644 index 2683af402287..000000000000 --- a/pkgs/applications/version-management/git-my/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - pname = "git-my"; - version = "1.1.2"; - - src = fetchFromGitHub { - owner = "davidosomething"; - repo = "git-my"; - rev = version; - sha256 = "0jji5zw25jygj7g4f6f3k0p0s9g37r8iad8pa0s67cxbq2v4sc0v"; - }; - - dontBuild = true; - - installPhase = '' - install -Dm755 -t "$out"/bin ./git-my - ''; - - meta = with lib; { - description = - "List remote branches if they're merged and/or available locally"; - homepage = "https://github.com/davidosomething/git-my"; - license = licenses.free; - maintainers = with maintainers; [ bb010g ]; - platforms = platforms.all; - mainProgram = "git-my"; - }; -} - diff --git a/pkgs/tools/misc/betterdiscordctl/default.nix b/pkgs/by-name/be/betterdiscordctl/package.nix similarity index 58% rename from pkgs/tools/misc/betterdiscordctl/default.nix rename to pkgs/by-name/be/betterdiscordctl/package.nix index aee7cd442535..4c1eae439215 100644 --- a/pkgs/tools/misc/betterdiscordctl/default.nix +++ b/pkgs/by-name/be/betterdiscordctl/package.nix @@ -1,13 +1,17 @@ -{ lib, stdenvNoCC, fetchFromGitHub }: +{ + fetchFromGitHub, + lib, + stdenvNoCC, +}: -stdenvNoCC.mkDerivation rec { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "betterdiscordctl"; version = "2.0.1"; src = fetchFromGitHub { owner = "bb010g"; repo = "betterdiscordctl"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "0p321rfcihz2779sdd6qfgpxgk5yd53d33vq5pvb50dbdgxww0bc"; }; @@ -19,9 +23,8 @@ stdenvNoCC.mkDerivation rec { installPhase = '' runHook preInstall - mkdir -p "$out/bin" "$out/share/doc/betterdiscordctl" - install -Dm744 betterdiscordctl $out/bin/betterdiscordctl - install -Dm644 README.md $out/share/doc/betterdiscordctl/README.md + install -Dm 755 -t "$out/bin" -- betterdiscordctl + install -Dm 644 -t "$out/share/doc/betterdiscordctl" -- README.md runHook postInstall ''; @@ -29,15 +32,19 @@ stdenvNoCC.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - $out/bin/betterdiscordctl --version + runHook preInstallCheck + + "$out/bin/betterdiscordctl" --version + + runHook postInstallCheck ''; - meta = with lib; { + meta = { homepage = "https://github.com/bb010g/betterdiscordctl"; description = "Utility for managing BetterDiscord on Linux"; - license = licenses.mit; + license = lib.licenses.mit; mainProgram = "betterdiscordctl"; - maintainers = with maintainers; [ bb010g ]; - platforms = platforms.linux; + maintainers = [ ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/gi/git-my/package.nix b/pkgs/by-name/gi/git-my/package.nix new file mode 100644 index 000000000000..9af49a536b4f --- /dev/null +++ b/pkgs/by-name/gi/git-my/package.nix @@ -0,0 +1,39 @@ +{ + bash, + fetchFromGitHub, + lib, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "git-my"; + version = "1.1.2"; + + src = fetchFromGitHub { + owner = "davidosomething"; + repo = "git-my"; + rev = finalAttrs.version; + sha256 = "0jji5zw25jygj7g4f6f3k0p0s9g37r8iad8pa0s67cxbq2v4sc0v"; + }; + + buildInputs = [ bash ]; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + install -Dm 755 -t "$out/bin" -- git-my + + runHook postInstall + ''; + + meta = { + description = "List remote branches if they're merged and/or available locally"; + homepage = "https://github.com/davidosomething/git-my"; + license = lib.licenses.free; + maintainers = [ ]; + platforms = lib.platforms.all; + mainProgram = "git-my"; + }; +}) diff --git a/pkgs/development/libraries/java/swt/awt-libs.patch b/pkgs/by-name/sw/swt/awt-libs.patch similarity index 100% rename from pkgs/development/libraries/java/swt/awt-libs.patch rename to pkgs/by-name/sw/swt/awt-libs.patch diff --git a/pkgs/development/libraries/java/swt/gtk-libs.patch b/pkgs/by-name/sw/swt/gtk-libs.patch similarity index 100% rename from pkgs/development/libraries/java/swt/gtk-libs.patch rename to pkgs/by-name/sw/swt/gtk-libs.patch diff --git a/pkgs/by-name/sw/swt/package.nix b/pkgs/by-name/sw/swt/package.nix new file mode 100644 index 000000000000..c67424f4fc06 --- /dev/null +++ b/pkgs/by-name/sw/swt/package.nix @@ -0,0 +1,155 @@ +{ + atk, + fetchzip, + glib, + gtk2, + jdk, + lib, + libGL, + libGLU, + libXt, + libXtst, + pkg-config, + stdenv, + stripJavaArchivesHook, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "swt"; + version = "4.5"; + fullVersion = "${finalAttrs.version}-201506032000"; + + hardeningDisable = [ "format" ]; + + passthru.srcMetadataByPlatform = { + x86_64-linux.platform = "gtk-linux-x86_64"; + x86_64-linux.sha256 = "17frac2nsx22hfa72264as31rn35hfh9gfgy0n6wvc3knl5d2716"; + i686-linux.platform = "gtk-linux-x86"; + i686-linux.sha256 = "13ca17rga9yvdshqvh0sfzarmdcl4wv4pid0ls7v35v4844zbc8b"; + x86_64-darwin.platform = "cocoa-macosx-x86_64"; + x86_64-darwin.sha256 = "0wjyxlw7i9zd2m8syd6k1q85fj8pzhxlfsrl8fpgsj37p698bd0a"; + }; + passthru.srcMetadata = + finalAttrs.passthru.srcMetadataByPlatform.${stdenv.hostPlatform.system} or null; + # Alas, the Eclipse Project apparently doesn't produce source-only + # releases of SWT. So we just grab a binary release and extract + # "src.zip" from that. + src = + let + inherit (finalAttrs.passthru) srcMetadata; + in + assert srcMetadata != null; + fetchzip { + url = "https://archive.eclipse.org/eclipse/downloads/drops4/R-${finalAttrs.fullVersion}/swt-${finalAttrs.version}-${srcMetadata.platform}.zip"; + inherit (srcMetadata) sha256; + stripRoot = false; + postFetch = '' + mkdir "$unpackDir" + cd "$unpackDir" + + renamed="$TMPDIR/src.zip" + mv -- "$out/src.zip" "$renamed" + unpackFile "$renamed" + rm -r -- "$out" + + mv -- "$unpackDir" "$out" + ''; + }; + + nativeBuildInputs = [ + stripJavaArchivesHook + pkg-config + ]; + buildInputs = [ + atk + gtk2 + jdk + libGL + libGLU + libXtst + ] ++ lib.optionals (lib.hasPrefix "8u" jdk.version) [ libXt ]; + + patches = [ + ./awt-libs.patch + ./gtk-libs.patch + ]; + + prePatch = '' + # clear whitespace from makefiles (since we match on EOL later) + sed -i 's/ \+$//' ./*.mak + ''; + + postPatch = + let + makefile-sed = builtins.toFile "swt-makefile.sed" '' + # fix pkg-config invocations in CFLAGS/LIBS pairs. + # + # change: + # FOOCFLAGS = `pkg-config --cflags `foo bar` + # FOOLIBS = `pkg-config --libs-only-L foo` -lbaz + # into: + # FOOCFLAGS = `pkg-config --cflags foo bar` + # FOOLIBS = `pkg-config --libs foo bar` + # + # the latter works more consistently. + /^[A-Z0-9_]\+CFLAGS = `pkg-config --cflags [^`]\+`$/ { + N + s/${'' + ^\([A-Z0-9_]\+\)CFLAGS = `pkg-config --cflags \(.\+\)`\ + \1LIBS = `pkg-config --libs-only-L .\+$''}/${'' + \1CFLAGS = `pkg-config --cflags \2`\ + \1LIBS = `pkg-config --libs \2`''}/ + } + # fix WebKit libs not being there + s/\$(WEBKIT_LIB) \$(WEBKIT_OBJECTS)$/\0 `pkg-config --libs glib-2.0`/g + ''; + in + '' + declare -a makefiles=(./*.mak) + sed -i -f ${makefile-sed} "''${makefiles[@]}" + # assign Makefile variables eagerly & change backticks to `$(shell …)` + sed -i -e 's/ = `\([^`]\+\)`/ := $(shell \1)/' \ + -e 's/`\([^`]\+\)`/$(shell \1)/' \ + "''${makefiles[@]}" + ''; + + buildPhase = '' + runHook preBuild + + export JAVA_HOME=${jdk} + + ./build.sh + + mkdir out + find org/ -name '*.java' -type f -exec javac -d out/ {} + + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + if [[ -n "$prefix" ]]; then + install -d -- "$prefix" + fi + + install -Dm 644 -t "$out/lib" -- *.so + + install -d -- "$out/jars" + install -m 644 -t out -- version.txt + (cd out && jar -c *) > "$out/jars/swt.jar" + + runHook postInstall + ''; + + meta = { + homepage = "https://www.eclipse.org/swt/"; + description = '' + A widget toolkit for Java to access the user-interface facilities of + the operating systems on which it is implemented. + ''; + license = lib.licenses.epl10; + maintainers = [ ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix deleted file mode 100644 index ef7994fea218..000000000000 --- a/pkgs/development/libraries/java/swt/default.nix +++ /dev/null @@ -1,154 +0,0 @@ -{ lib -, stdenv -, stripJavaArchivesHook -, fetchzip -, pkg-config -, atk -, glib -, gtk2 -, jdk -, libGL -, libGLU -, libXt -, libXtst -}: - -let - platformMap = { - x86_64-linux = - { platform = "gtk-linux-x86_64"; - sha256 = "17frac2nsx22hfa72264as31rn35hfh9gfgy0n6wvc3knl5d2716"; }; - i686-linux = - { platform = "gtk-linux-x86"; - sha256 = "13ca17rga9yvdshqvh0sfzarmdcl4wv4pid0ls7v35v4844zbc8b"; }; - x86_64-darwin = - { platform = "cocoa-macosx-x86_64"; - sha256 = "0wjyxlw7i9zd2m8syd6k1q85fj8pzhxlfsrl8fpgsj37p698bd0a"; }; - }; - - metadata = assert platformMap ? ${stdenv.hostPlatform.system}; - platformMap.${stdenv.hostPlatform.system}; -in stdenv.mkDerivation rec { - pname = "swt"; - version = "4.5"; - fullVersion = "${version}-201506032000"; - - hardeningDisable = [ "format" ]; - - # Alas, the Eclipse Project apparently doesn't produce source-only - # releases of SWT. So we just grab a binary release and extract - # "src.zip" from that. - src = fetchzip { - url = "https://archive.eclipse.org/eclipse/downloads/drops4/" + - "R-${fullVersion}/${pname}-${version}-${metadata.platform}.zip"; - inherit (metadata) sha256; - stripRoot = false; - postFetch = '' - mkdir "$unpackDir" - cd "$unpackDir" - - renamed="$TMPDIR/src.zip" - mv "$out/src.zip" "$renamed" - unpackFile "$renamed" - rm -r "$out" - - mv "$unpackDir" "$out" - ''; - }; - - nativeBuildInputs = [ - stripJavaArchivesHook - pkg-config - ]; - buildInputs = [ - atk - gtk2 - jdk - libGL - libGLU - libXtst - ] ++ lib.optionals (lib.hasPrefix "8u" jdk.version) [ - libXt - ]; - - patches = [ ./awt-libs.patch ./gtk-libs.patch ]; - - prePatch = '' - # clear whitespace from makefiles (since we match on EOL later) - sed -i 's/ \+$//' ./*.mak - ''; - - postPatch = let makefile-sed = builtins.toFile "swt-makefile.sed" ('' - # fix pkg-config invocations in CFLAGS/LIBS pairs. - # - # change: - # FOOCFLAGS = `pkg-config --cflags `foo bar` - # FOOLIBS = `pkg-config --libs-only-L foo` -lbaz - # into: - # FOOCFLAGS = `pkg-config --cflags foo bar` - # FOOLIBS = `pkg-config --libs foo bar` - # - # the latter works more consistently. - /^[A-Z0-9_]\+CFLAGS = `pkg-config --cflags [^`]\+`$/ { - N - s'' + - "/" + '' - ^\([A-Z0-9_]\+\)CFLAGS = `pkg-config --cflags \(.\+\)`\ - \1LIBS = `pkg-config --libs-only-L .\+$'' + - "/" + '' - \1CFLAGS = `pkg-config --cflags \2`\ - \1LIBS = `pkg-config --libs \2`'' + - "/\n" + '' - } - # fix WebKit libs not being there - s/\$(WEBKIT_LIB) \$(WEBKIT_OBJECTS)$/\0 `pkg-config --libs glib-2.0`/g - ''); in '' - declare -a makefiles=(./*.mak) - sed -i -f ${makefile-sed} "''${makefiles[@]}" - # assign Makefile variables eagerly & change backticks to `$(shell …)` - sed -i -e 's/ = `\([^`]\+\)`/ := $(shell \1)/' \ - -e 's/`\([^`]\+\)`/$(shell \1)/' \ - "''${makefiles[@]}" - ''; - - buildPhase = '' - runHook preBuild - - export JAVA_HOME=${jdk} - - ./build.sh - - mkdir out - find org/ -name '*.java' -type f -exec javac -d out/ {} + - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - if [ -n "$prefix" ]; then - mkdir -p "$prefix" - fi - - mkdir -p "$out/lib" - cp -t "$out/lib" ./*.so - - mkdir -p "$out/jars" - cp -t out/ version.txt - (cd out && jar -c *) > "$out/jars/swt.jar" - - runHook postInstall - ''; - - meta = with lib; { - homepage = "https://www.eclipse.org/swt/"; - description = '' - A widget toolkit for Java to access the user-interface facilities of - the operating systems on which it is implemented. - ''; - license = licenses.epl10; - maintainers = with maintainers; [ bb010g ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/tools/misc/mandoc/default.nix b/pkgs/tools/misc/mandoc/default.nix index e8553b7f9e58..af5ca9ac87b5 100644 --- a/pkgs/tools/misc/mandoc/default.nix +++ b/pkgs/tools/misc/mandoc/default.nix @@ -76,6 +76,6 @@ stdenv.mkDerivation rec { downloadPage = "http://mandoc.bsd.lv/snapshots/"; license = licenses.bsd3; platforms = platforms.all; - maintainers = with maintainers; [ bb010g ramkromberg sternenseemann ]; + maintainers = with maintainers; [ ramkromberg sternenseemann ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec44ebd583e1..5c5b622f2849 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2349,8 +2349,6 @@ with pkgs; git-mit = callPackage ../applications/version-management/git-mit { }; - git-my = callPackage ../applications/version-management/git-my { }; - git-machete = python3Packages.callPackage ../applications/version-management/git-machete { }; git-nomad = callPackage ../applications/version-management/git-nomad { }; @@ -3332,8 +3330,6 @@ with pkgs; berglas = callPackage ../tools/admin/berglas { }; - betterdiscordctl = callPackage ../tools/misc/betterdiscordctl { }; - betterdiscord-installer = callPackage ../tools/misc/betterdiscord-installer { }; binocle = callPackage ../applications/misc/binocle { @@ -24982,8 +24978,7 @@ with pkgs; smack = callPackage ../development/libraries/java/smack { }; - swt = callPackage ../development/libraries/java/swt { }; - swt_jdk8 = callPackage ../development/libraries/java/swt { + swt_jdk8 = callPackage ../by-name/sw/swt/package.nix { jdk = jdk8; };