about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-10-29 00:02:26 +0000
committerGitHub <noreply@github.com>2022-10-29 00:02:26 +0000
commitf349a716a3c4b69ad26ac581be1509b89bb5ad22 (patch)
treea0b3171f16fa4e57c47b58544c507097b71c6cf6 /pkgs/build-support
parent6e5f43a5bd212b24f777dcda49875fb72b73401c (diff)
parent34a23b028d613b2c3f61e7af4271f82ac21849f6 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/skaware/build-skaware-man-pages.nix45
-rw-r--r--pkgs/build-support/skaware/build-skaware-package.nix117
-rw-r--r--pkgs/build-support/skaware/clean-packaging.nix53
3 files changed, 0 insertions, 215 deletions
diff --git a/pkgs/build-support/skaware/build-skaware-man-pages.nix b/pkgs/build-support/skaware/build-skaware-man-pages.nix
deleted file mode 100644
index 92d8202ae95a8..0000000000000
--- a/pkgs/build-support/skaware/build-skaware-man-pages.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ lib, stdenv, fetchFromGitHub }:
-
-{
-  # : string
-  pname
-  # : string
-, version
-  # : string
-, sha256
-  # : string
-, description
-  # : list Maintainer
-, maintainers
-  # : license
-, license ? lib.licenses.isc
-  # : string
-, owner ? "flexibeast"
-  # : string
-, rev ? "v${version}"
-}:
-
-let
-  manDir = "${placeholder "out"}/share/man";
-
-  src = fetchFromGitHub {
-    inherit owner rev sha256;
-    repo = pname;
-  };
-in
-
-stdenv.mkDerivation {
-  inherit pname version src;
-
-  makeFlags = [
-    "MANPATH=${manDir}"
-  ];
-
-  dontBuild = true;
-
-  meta = with lib; {
-    inherit description license maintainers;
-    inherit (src.meta) homepage;
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/build-support/skaware/build-skaware-package.nix b/pkgs/build-support/skaware/build-skaware-package.nix
deleted file mode 100644
index 3ae9b7ce8aac2..0000000000000
--- a/pkgs/build-support/skaware/build-skaware-package.nix
+++ /dev/null
@@ -1,117 +0,0 @@
-{ lib, stdenv, cleanPackaging, fetchurl }:
-{
-  # : string
-  pname
-  # : string
-, version
-  # : string
-, sha256
-  # : string
-, description
-  # : list Platform
-, platforms ? lib.platforms.all
-  # : list string
-, outputs ? [ "bin" "lib" "dev" "doc" "out" ]
-  # TODO(Profpatsch): automatically infer most of these
-  # : list string
-, configureFlags
-  # : string
-, postConfigure ? null
-  # mostly for moving and deleting files from the build directory
-  # : lines
-, postInstall
-  # : list Maintainer
-, maintainers ? [ ]
-  # : passthru arguments (e.g. tests)
-, passthru ? { }
-
-}:
-
-let
-
-  # File globs that can always be deleted
-  commonNoiseFiles = [
-    ".gitignore"
-    "Makefile"
-    "INSTALL"
-    "configure"
-    "patch-for-solaris"
-    "src/**/*"
-    "tools/**/*"
-    "package/**/*"
-    "config.mak"
-  ];
-
-  # File globs that should be moved to $doc
-  commonMetaFiles = [
-    "COPYING"
-    "AUTHORS"
-    "NEWS"
-    "CHANGELOG"
-    "README"
-    "README.*"
-    "DCO"
-    "CONTRIBUTING"
-  ];
-
-in
-stdenv.mkDerivation {
-  inherit pname version;
-
-  src = fetchurl {
-    url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  inherit outputs;
-
-  dontDisableStatic = true;
-  enableParallelBuilding = true;
-
-  configureFlags = configureFlags ++ [
-    "--enable-absolute-paths"
-    # We assume every nix-based cross target has urandom.
-    # This might not hold for e.g. BSD.
-    "--with-sysdep-devurandom=yes"
-    (if stdenv.isDarwin
-    then "--disable-shared"
-    else "--enable-shared")
-  ]
-    # On darwin, the target triplet from -dumpmachine includes version number,
-    # but skarnet.org software uses the triplet to test binary compatibility.
-    # Explicitly setting target ensures code can be compiled against a skalibs
-    # binary built on a different version of darwin.
-    # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
-    ++ (lib.optional stdenv.isDarwin
-    "--build=${stdenv.hostPlatform.system}");
-
-  inherit postConfigure;
-
-  makeFlags = lib.optionals stdenv.cc.isClang [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ];
-
-  # TODO(Profpatsch): ensure that there is always a $doc output!
-  postInstall = ''
-    echo "Cleaning & moving common files"
-    ${cleanPackaging.commonFileActions {
-       noiseFiles = commonNoiseFiles;
-       docFiles = commonMetaFiles;
-     }} $doc/share/doc/${pname}
-
-    ${postInstall}
-  '';
-
-  postFixup = ''
-    ${cleanPackaging.checkForRemainingFiles}
-  '';
-
-  meta = {
-    homepage = "https://skarnet.org/software/${pname}/";
-    inherit description platforms;
-    license = lib.licenses.isc;
-    maintainers = with lib.maintainers;
-      [ pmahoney Profpatsch qyliss ] ++ maintainers;
-  };
-
-  inherit passthru;
-
-}
diff --git a/pkgs/build-support/skaware/clean-packaging.nix b/pkgs/build-support/skaware/clean-packaging.nix
deleted file mode 100644
index d51cbec8aeb26..0000000000000
--- a/pkgs/build-support/skaware/clean-packaging.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-# set of utilities that assure the cwd of a build
-# is completely clean after the build, meaning all
-# files were either discarded or moved to outputs.
-# This ensures nothing is forgotten and new files
-# are correctly handled on update.
-{ lib, stdenv, file, writeScript }:
-
-let
-  globWith = lib.concatMapStringsSep "\n";
-  rmNoise = noiseGlobs: globWith (f:
-    "rm -rf ${f}") noiseGlobs;
-  mvDoc = docGlobs: globWith
-    (f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
-    docGlobs;
-
-  # Shell script that implements common move & remove actions
-  # $1 is the doc directory (will be created).
-  # Best used in conjunction with checkForRemainingFiles
-  commonFileActions =
-    { # list of fileglobs that are removed from the source dir
-      noiseFiles
-      # files that are moved to the doc directory ($1)
-      # TODO(Profpatsch): allow to set target dir with
-      # { glob = …; to = "html" } (relative to docdir)
-    , docFiles }:
-    writeScript "common-file-actions.sh" ''
-      #!${stdenv.shell}
-      set -e
-      DOCDIR="''${1?commonFileActions: DOCDIR as argv[1] required}"
-      shopt -s globstar extglob nullglob
-      mkdir -p "$DOCDIR"
-      ${mvDoc docFiles}
-      ${rmNoise noiseFiles}
-    '';
-
-  # Shell script to check whether the build directory is empty.
-  # If there are still files remaining, exit 1 with a helpful
-  # listing of all remaining files and their types.
-  checkForRemainingFiles = writeScript "check-for-remaining-files.sh" ''
-    #!${stdenv.shell}
-    echo "Checking for remaining source files"
-    rem=$(find -mindepth 1 -xtype f -print0 \
-           | tee $TMP/remaining-files)
-    if [[ "$rem" != "" ]]; then
-      echo "ERROR: These files should be either moved or deleted:"
-      cat $TMP/remaining-files | xargs -0 ${file}/bin/file
-      exit 1
-    fi
-  '';
-
-in {
-  inherit commonFileActions checkForRemainingFiles;
-}