Commit Graph

24 Commits

Author SHA1 Message Date
Robert Schütz
6f5cb5357c ghostscript: 10.07.0 -> 10.07.1
Changelog: https://ghostscript.readthedocs.io/en/gs10.07.1/News.html
2026-05-31 12:59:42 -07:00
Sergei Trofimovich
26a26d898a ghostscript: fix i686 build, drop upstreamed 32-bit patch
Without the change the build fails on `staging` as:

```
$ nix build --no-link -f. pkgsi686Linux.ghostscript --keep-going -L
...
ghostscript-with-X> applying patch /nix/store/q1dgaydqa5rvgccxz8hcwfwanqh3s71p-3c0be6e4fcffa63e4a5a1b0aec057cebc4d2562f.patch?full_index=1
ghostscript-with-X> patching file base/gdevdbit.c
ghostscript-with-X> Reversed (or previously applied) patch detected!  Assume -R? [n]
ghostscript-with-X> Apply anyway? [n]
ghostscript-with-X> Skipping patch.
ghostscript-with-X> 1 out of 1 hunk ignored -- saving rejects to file base/gdevdbit.c.rej
ghostscript-with-X> patching file base/gdevmpla.c
ghostscript-with-X> Reversed (or previously applied) patch detected!  Assume -R? [n]
ghostscript-with-X> Apply anyway? [n]
ghostscript-with-X> Skipping patch.
ghostscript-with-X> 2 out of 2 hunks ignored -- saving rejects to file base/gdevmpla.c.rej
```
2026-05-06 06:14:21 +01:00
nixpkgs-ci[bot]
4830a538d9 ghostscript: 10.06.0 -> 10.07.0 (#511383) 2026-04-20 05:23:37 +00:00
Vladimír Čunát
6db1a80a73 Revert "ghostscript: avoid rebuild on linux for now"
This reverts commit 52cda273a4.
2026-04-19 20:19:20 +02:00
Vladimír Čunát
52cda273a4 ghostscript: avoid rebuild on linux for now 2026-04-19 18:37:58 +02:00
Sizhe Zhao
d2648b9aee ghostscript: use -std=gnu17 2026-04-19 21:00:15 +08:00
Sizhe Zhao
3ee53e0631 ghostscript: 10.06.0 -> 10.07.0 2026-04-19 20:43:05 +08:00
quantenzitrone
626f23ce26 various: switch packages to use finalAttrs
this shouldn't create any rebuilds

the following script was used to generate this:
```fish
#!/usr/bin/env fish

# nix shell .#nixfmt nixpkgs#{nixf-diagnose,ripgrep,sd}

set base (git rev-parse HEAD)

set scope pkgs/by-name

set files (rg --files-with-matches -F 'stdenv.mkDerivation rec {' $scope | sort -u)

for file in $files
    echo $file
    sd -F 'stdenv.mkDerivation rec {' 'stdenv.mkDerivation (finalAttrs: {' $file
    # version
    sd -F 'version}' 'finalAttrs.version}' $file
    sd -F '${version' '${finalAttrs.version' $file
    sd -F '= version' '= finalAttrs.version' $file
    sd -F 'inherit version;' 'inherit (finalAttrs) version;' $file
    sd -F ' + version;' ' + finalAttrs.version;' $file
    sd 'replaceStrings (.*) version' 'replaceStrings $1 finalAttrs.version' $file
    sd -F 'splitVersion version' 'splitVersion finalAttrs.version' $file
    sd -F 'versionAtLeast version' 'versionAtLeast finalAttrs.version' $file
    sd 'versions\.([a-z]+) version' 'versions.$1 finalAttrs.version' $file
    # src
    sd -F 'src}' 'finalAttrs.src}' $file
    sd -F '${src' '${finalAttrs.src' $file
    sd -F '= src' '= finalAttrs.src' $file
    sd -F 'inherit src;' 'inherit (finalAttrs) src;' $file
    sd -F 'inherit (src' 'inherit (finalAttrs.src' $file
    # meta
    sd -F '${meta' '${finalAttrs.meta' $file
    sd -F '= meta' '= finalAttrs.meta' $file
    sd -F 'inherit (meta' 'inherit (finalAttrs.meta' $file
    # other
    sd -F 'inherit version src;' 'inherit (finalAttrs) version src;' $file
    sd -F 'makeLibraryPath buildInputs' 'makeLibraryPath finalAttrs.buildInputs' $file
    sd -F 'buildInputs}' 'finalAttrs.buildInputs}' $file
    sd -F 'desktopItem}' 'finalAttrs.desktopItem}' $file
    sd -F 'runtimeLibs}' 'finalAttrs.runtimeLibs}' $file
    sd -F 'libPath}' 'finalAttrs.libPath}' $file
    sd -F 'runtimeDependencies}' 'finalAttrs.runtimeDependencies}' $file
    sd -F 'nativeRuntimeInputs}' 'finalAttrs.nativeRuntimeInputs}' $file
    sd -F '(!doCheck)' '(!finalAttrs.doCheck)' $file
    sd -F 'optional doCheck' 'optional finalAttrs.doCheck' $file
    sd -F 'optionals doCheck' 'optionals finalAttrs.doCheck' $file
    sd -F '++ runtimeDependencies' '++ finalAttrs.runtimeDependencies' $file
    # pname (restored afterwards)
    sd -F 'pname}' 'finalAttrs.pname}' $file
    sd -F '${pname' '${finalAttrs.pname' $file
    sd -F '= pname' '= finalAttrs.pname' $file
    # close finalAttrs lambda
    echo ')' >>$file
    # catch some errors early
    if ! nixfmt $file
        git restore $file
        continue
    end
    if ! nixf-diagnose -i sema-primop-overridden $file
        git restore $file
        continue
    end
end

set torestore (rg -F .finalAttrs --files-with-matches $scope)
if test (count $torestore) -gt 0
    git restore $torestore
end
set torestore (rg -F finalAttrs.pname --files-with-matches $scope)
if test (count $torestore) -gt 0
    git restore $torestore
end

# commit for faster eval times
git add pkgs
git commit --no-gpg-sign -m temp
set torestore

for file in $files
    # file hasn't changed
    if git diff --quiet $base $file
        continue
    end
    # try to eval the package to definitely catch all errors
    echo $file
    set pname (string split / $file -f 4)
    if ! nix eval .#$pname
        set torestore $torestore $file
    end
end

# restore files that don't eval
git reset --soft $base
git restore --staged .
if test (count $torestore) -gt 0
    git restore $torestore
end
```

after that some manual cleanup was done:
- restoring files that cause changes in the number of lines
- restoring files that cause rebuilds
- restoring files that cause merge conflicts with staging
2026-02-07 09:59:05 +01:00
quantenzitrone
7d8132a92c treewide: remove references to the xorg namespace in pkgs (automated)
this creates some eval errors that will be fixed in the next commit

done with the following script:

```fish
\#!/usr/bin/env fish

set packagesjson (nix eval --impure --json --expr '
let
  lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
  name: _:
  if name == "lib" then
    lib
  else if name == "config" then
    { allowAliases = false; }
  else
    name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)

set one (grep '^    [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^  [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)

for arg in $one $two
    set oname $arg
    set nname (echo $packagesjson | jq -r .$oname)

    if test $nname = null
        echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
        continue
    end

    echo $oname "->" $nname

    # replace basic xorg.$name references
    for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
        # special cases
        sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file

        # replace
        sd -F "xorg.$oname" "$nname" $file

        # fixup function arguments

        # prevent duplicate function args
        if grep -E " ($oname|$nname),\$" $file >/dev/null
            continue
        end

        if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg

            if grep ' xorg,$' $file >/dev/null
                sd ' xorg,$' " xorg,
                $nname," $file

            else if grep ' xorg ? .*,$' $file >/dev/null
                sd 'xorg( ? .*),$' "xorg\$1,
                $nname," $file

            else
                sd -F 'xorg,' "$nname,
                xorg," $file
            end

        else # case there is no more xorg..* so we can just replace the function arg
            sd 'xorg(| ? .*),.*$' "$nname," $file
        end
    end
end

nix fmt
```
2026-01-25 22:28:09 +01:00
Rafael Ieda
fba21b3d22 treewide: remove iedame 2025-11-10 10:24:56 -03:00
Rafael Ieda
6b3e25c4ee ghostscript: add maintainer iedame 2025-10-24 01:53:02 -03:00
Grimmauld
35283e48df ghostscript: fix for 32 bit 2025-10-04 11:45:38 +02:00
Simon Hauser
3eb0294617 ghostscript: 10.05.1 -> 10.06.0
Changelog: https://ghostscript.readthedocs.io/en/gs10.06.0/News.html
2025-09-10 09:10:12 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Simon Hauser
313962f485 ghostscript: 10.05.0 -> 10.05.1
Changelog: https://ghostscript.readthedocs.io/en/gs10.05.1/News.html
2025-04-30 10:59:55 +02:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Simon Hauser
9bb374e093 ghostscript: 10.04.0 -> 10.05.0
Changelog: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs10050
2025-03-13 14:19:54 +01:00
misuzu
bc812fb47c ghostscript: fix cross for armv7l (#363237) 2024-12-13 13:12:15 +02:00
Arne Keller
24cef9681f ghostscript: fix install names on Darwin (#359025) 2024-12-13 10:39:51 +01:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Tobias Mayer
93368ac469 ghostscript: fix cross for armv7l
... and possibly others.
2024-12-08 15:32:09 +01:00
Luflosi
db216f91c2 ghostscript: support SOURCE_DATE_EPOCH for reproducible builds
Without this patch, it is impossible to generate PDF documents in a reproducible way using Ghostscript, as CreationDate and ModDate are included in the PDF, which are based on the current time. I ran into this problem while using the LATEX command `\includegraphics` with an `.eps` graphic.
The Ghostscript developers are not interested in fixing this and rejected the patch, see https://bugs.ghostscript.com/show_bug.cgi?id=696765#c28.
[Debian carries the same patch](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794004), as does [Arch Linux](426e6bf6f2).
2024-12-05 23:12:44 +01:00
Carlo Cabrera
29bbd1bc81 ghostscript: fix install names on Darwin
Port of #358079.

This should avoid the need to mess around with `install_name_tool`
entirely. This mirrors what is done by Homebrew[^1] and MacPorts[^2].

[^1]: 5ca4f8ce76/Formula/g/ghostscript.rb (L76)
[^2]: d8a05520fa/print/ghostscript/Portfile (L114)
2024-11-25 23:08:54 +08:00
aleksana
571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00