Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-09-14 00:15:12 +00:00 committed by GitHub
commit 35f1a5b515
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
211 changed files with 7466 additions and 2633 deletions

View File

@ -63,7 +63,6 @@ rec {
See [`extends`](#function-library-lib.fixedPoints.extends) for an example use case. See [`extends`](#function-library-lib.fixedPoints.extends) for an example use case.
There `self` is also often called `final`. There `self` is also often called `final`.
# Inputs # Inputs
`f` `f`
@ -90,7 +89,12 @@ rec {
::: :::
*/ */
fix = f: let x = f x; in x; fix =
f:
let
x = f x;
in
x;
/** /**
A variant of `fix` that records the original recursive attribute set in the A variant of `fix` that records the original recursive attribute set in the
@ -99,14 +103,20 @@ rec {
This is useful in combination with the `extends` function to This is useful in combination with the `extends` function to
implement deep overriding. implement deep overriding.
# Inputs # Inputs
`f` `f`
: 1\. Function argument : 1\. Function argument
*/ */
fix' = f: let x = f x // { __unfix__ = f; }; in x; fix' =
f:
let
x = f x // {
__unfix__ = f;
};
in
x;
/** /**
Return the fixpoint that `f` converges to when called iteratively, starting Return the fixpoint that `f` converges to when called iteratively, starting
@ -117,7 +127,6 @@ rec {
0 0
``` ```
# Inputs # Inputs
`f` `f`
@ -134,13 +143,12 @@ rec {
(a -> a) -> a -> a (a -> a) -> a -> a
``` ```
*/ */
converge = f: x: converge =
f: x:
let let
x' = f x; x' = f x;
in in
if x' == x if x' == x then x else converge f x';
then x
else converge f x';
/** /**
Extend a function using an overlay. Extend a function using an overlay.
@ -149,7 +157,6 @@ rec {
A fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument. A fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument.
This is possible due to Nix's lazy evaluation. This is possible due to Nix's lazy evaluation.
A fixed-point function returning an attribute set has the form A fixed-point function returning an attribute set has the form
```nix ```nix
@ -257,7 +264,6 @@ rec {
``` ```
::: :::
# Inputs # Inputs
`overlay` `overlay`
@ -299,8 +305,7 @@ rec {
::: :::
*/ */
extends = extends =
overlay: overlay: f:
f:
# The result should be thought of as a function, the argument of that function is not an argument to `extends` itself # The result should be thought of as a function, the argument of that function is not an argument to `extends` itself
( (
final: final:
@ -311,63 +316,98 @@ rec {
); );
/** /**
Compose two extending functions of the type expected by 'extends' Compose two overlay functions and return a single overlay function that combines them.
into one where changes made in the first are available in the For more details see: [composeManyExtensions](#function-library-lib.fixedPoints.composeManyExtensions).
'super' of the second
# Inputs
`f`
: 1\. Function argument
`g`
: 2\. Function argument
`final`
: 3\. Function argument
`prev`
: 4\. Function argument
*/ */
composeExtensions = composeExtensions =
f: g: final: prev: f: g: final: prev:
let fApplied = f final prev; let
prev' = prev // fApplied; fApplied = f final prev;
in fApplied // g final prev'; prev' = prev // fApplied;
in
fApplied // g final prev';
/** /**
Compose several extending functions of the type expected by 'extends' into Composes a list of [`overlays`](#chap-overlays) and returns a single overlay function that combines them.
one where changes made in preceding functions are made available to
subsequent ones. :::{.note}
The result is produced by using the update operator `//`.
This means nested values of previous overlays are not merged recursively.
In other words, previously defined attributes are replaced, ignoring the previous value, unless referenced by the overlay; for example `final: prev: { foo = final.foo + 1; }`.
:::
# Inputs
`extensions`
: A list of overlay functions
:::{.note}
The order of the overlays in the list is important.
:::
: Each overlay function takes two arguments, by convention `final` and `prev`, and returns an attribute set.
- `final` is the result of the fixed-point function, with all overlays applied.
- `prev` is the result of the previous overlay function(s).
# Type
``` ```
composeManyExtensions : [packageSet -> packageSet -> packageSet] -> packageSet -> packageSet -> packageSet # Pseudo code
^final ^prev ^overrides ^final ^prev ^overrides let
# final prev
# ↓ ↓
OverlayFn = { ... } -> { ... } -> { ... };
in
composeManyExtensions :: ListOf OverlayFn -> OverlayFn
``` ```
# Examples
:::{.example}
## `lib.fixedPoints.composeManyExtensions` usage example
```nix
let
# The "original function" that is extended by the overlays.
# Note that it doesn't have prev: as argument since no overlay function precedes it.
original = final: { a = 1; };
# Each overlay function has 'final' and 'prev' as arguments.
overlayA = final: prev: { b = final.c; c = 3; };
overlayB = final: prev: { c = 10; x = prev.c or 5; };
extensions = composeManyExtensions [ overlayA overlayB ];
# Caluculate the fixed point of all composed overlays.
fixedpoint = lib.fix (lib.extends extensions original );
in fixedpoint
=>
{
a = 1;
b = 10;
c = 10;
x = 3;
}
```
:::
*/ */
composeManyExtensions = composeManyExtensions = lib.foldr (x: y: composeExtensions x y) (final: prev: { });
lib.foldr (x: y: composeExtensions x y) (final: prev: {});
/** /**
Create an overridable, recursive attribute set. For example: Create an overridable, recursive attribute set. For example:
``` ```
nix-repl> obj = makeExtensible (self: { }) nix-repl> obj = makeExtensible (final: { })
nix-repl> obj nix-repl> obj
{ __unfix__ = «lambda»; extend = «lambda»; } { __unfix__ = «lambda»; extend = «lambda»; }
nix-repl> obj = obj.extend (self: super: { foo = "foo"; }) nix-repl> obj = obj.extend (final: prev: { foo = "foo"; })
nix-repl> obj nix-repl> obj
{ __unfix__ = «lambda»; extend = «lambda»; foo = "foo"; } { __unfix__ = «lambda»; extend = «lambda»; foo = "foo"; }
nix-repl> obj = obj.extend (self: super: { foo = super.foo + " + "; bar = "bar"; foobar = self.foo + self.bar; }) nix-repl> obj = obj.extend (final: prev: { foo = prev.foo + " + "; bar = "bar"; foobar = final.foo + final.bar; })
nix-repl> obj nix-repl> obj
{ __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; } { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; }
@ -379,7 +419,6 @@ rec {
Same as `makeExtensible` but the name of the extending attribute is Same as `makeExtensible` but the name of the extending attribute is
customized. customized.
# Inputs # Inputs
`extenderName` `extenderName`
@ -390,8 +429,13 @@ rec {
: 2\. Function argument : 2\. Function argument
*/ */
makeExtensibleWithCustomName = extenderName: rattrs: makeExtensibleWithCustomName =
fix' (self: (rattrs self) // { extenderName: rattrs:
${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs); fix' (
}); self:
(rattrs self)
// {
${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);
}
);
} }

View File

@ -56,3 +56,16 @@ The maintainer is designated by a `selector` which must be one of:
see [`maintainer-list.nix`] for the fields' definition. see [`maintainer-list.nix`] for the fields' definition.
[`maintainer-list.nix`]: ../maintainer-list.nix [`maintainer-list.nix`]: ../maintainer-list.nix
## Conventions
### `sha-to-sri.py`
`sha-to-sri.py path ...` (atomically) rewrites hash attributes (named `hash` or `sha(1|256|512)`)
into the SRI format: `hash = "{hash name}-{base64 encoded value}"`.
`path` must point to either a nix file, or a directory which will be automatically traversed.
`sha-to-sri.py` automatically skips files whose first non-empty line contains `generated by` or `do not edit`.
Moreover, when walking a directory tree, the script will skip files whose name is `yarn.nix` or contains `generated`.

View File

@ -1,13 +1,13 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i "python3 -I" -p "python3.withPackages(p: with p; [ rich structlog ])" #! nix-shell -i "python3 -I" -p "python3.withPackages(p: with p; [ rich structlog ])"
from abc import ABC, abstractclassmethod, abstractmethod from abc import ABC, abstractmethod
from contextlib import contextmanager from contextlib import contextmanager
from pathlib import Path from pathlib import Path
from structlog.contextvars import bound_contextvars as log_context from structlog.contextvars import bound_contextvars as log_context
from typing import ClassVar, List, Tuple from typing import ClassVar, List, Tuple
import hashlib, re, structlog import hashlib, logging, re, structlog
logger = structlog.getLogger("sha-to-SRI") logger = structlog.getLogger("sha-to-SRI")
@ -26,11 +26,12 @@ class Encoding(ABC):
assert len(digest) == self.n assert len(digest) == self.n
from base64 import b64encode from base64 import b64encode
return f"{self.hashName}-{b64encode(digest).decode()}" return f"{self.hashName}-{b64encode(digest).decode()}"
@classmethod @classmethod
def all(cls, h) -> 'List[Encoding]': def all(cls, h) -> "List[Encoding]":
return [ c(h) for c in cls.__subclasses__() ] return [c(h) for c in cls.__subclasses__()]
def __init__(self, h): def __init__(self, h):
self.n = h.digest_size self.n = h.digest_size
@ -38,54 +39,56 @@ class Encoding(ABC):
@property @property
@abstractmethod @abstractmethod
def length(self) -> int: def length(self) -> int: ...
...
@property @property
def regex(self) -> str: def regex(self) -> str:
return f"[{self.alphabet}]{{{self.length}}}" return f"[{self.alphabet}]{{{self.length}}}"
@abstractmethod @abstractmethod
def decode(self, s: str) -> bytes: def decode(self, s: str) -> bytes: ...
...
class Nix32(Encoding): class Nix32(Encoding):
alphabet = "0123456789abcdfghijklmnpqrsvwxyz" alphabet = "0123456789abcdfghijklmnpqrsvwxyz"
inverted = { c: i for i, c in enumerate(alphabet) } inverted = {c: i for i, c in enumerate(alphabet)}
@property @property
def length(self): def length(self):
return 1 + (8 * self.n) // 5 return 1 + (8 * self.n) // 5
def decode(self, s: str): def decode(self, s: str):
assert len(s) == self.length assert len(s) == self.length
out = [ 0 for _ in range(self.n) ] out = bytearray(self.n)
# TODO: Do better than a list of byte-sized ints
for n, c in enumerate(reversed(s)): for n, c in enumerate(reversed(s)):
digit = self.inverted[c] digit = self.inverted[c]
i, j = divmod(5 * n, 8) i, j = divmod(5 * n, 8)
out[i] = out[i] | (digit << j) & 0xff out[i] = out[i] | (digit << j) & 0xFF
rem = digit >> (8 - j) rem = digit >> (8 - j)
if rem == 0: if rem == 0:
continue continue
elif i < self.n: elif i < self.n:
out[i+1] = rem out[i + 1] = rem
else: else:
raise ValueError(f"Invalid nix32 hash: '{s}'") raise ValueError(f"Invalid nix32 hash: '{s}'")
return bytes(out) return bytes(out)
class Hex(Encoding): class Hex(Encoding):
alphabet = "0-9A-Fa-f" alphabet = "0-9A-Fa-f"
@property @property
def length(self): def length(self):
return 2 * self.n return 2 * self.n
def decode(self, s: str): def decode(self, s: str):
from binascii import unhexlify from binascii import unhexlify
return unhexlify(s) return unhexlify(s)
class Base64(Encoding): class Base64(Encoding):
alphabet = "A-Za-z0-9+/" alphabet = "A-Za-z0-9+/"
@ -94,36 +97,39 @@ class Base64(Encoding):
"""Number of characters in data and padding.""" """Number of characters in data and padding."""
i, k = divmod(self.n, 3) i, k = divmod(self.n, 3)
return 4 * i + (0 if k == 0 else k + 1), (3 - k) % 3 return 4 * i + (0 if k == 0 else k + 1), (3 - k) % 3
@property @property
def length(self): def length(self):
return sum(self.format) return sum(self.format)
@property @property
def regex(self): def regex(self):
data, padding = self.format data, padding = self.format
return f"[{self.alphabet}]{{{data}}}={{{padding}}}" return f"[{self.alphabet}]{{{data}}}={{{padding}}}"
def decode(self, s): def decode(self, s):
from base64 import b64decode from base64 import b64decode
return b64decode(s, validate = True) return b64decode(s, validate = True)
_HASHES = (hashlib.new(n) for n in ('SHA-256', 'SHA-512')) _HASHES = (hashlib.new(n) for n in ("SHA-256", "SHA-512"))
ENCODINGS = { ENCODINGS = {h.name: Encoding.all(h) for h in _HASHES}
h.name: Encoding.all(h)
for h in _HASHES
}
RE = { RE = {
h: "|".join( h: "|".join(
(f"({h}-)?" if e.name == 'base64' else '') + (f"({h}-)?" if e.name == "base64" else "") + f"(?P<{h}_{e.name}>{e.regex})"
f"(?P<{h}_{e.name}>{e.regex})"
for e in encodings for e in encodings
) for h, encodings in ENCODINGS.items() )
for h, encodings in ENCODINGS.items()
} }
_DEF_RE = re.compile("|".join( _DEF_RE = re.compile(
f"(?P<{h}>{h} = (?P<{h}_quote>['\"])({re})(?P={h}_quote);)" "|".join(
for h, re in RE.items() f"(?P<{h}>{h} = (?P<{h}_quote>['\"])({re})(?P={h}_quote);)"
)) for h, re in RE.items()
)
)
def defToSRI(s: str) -> str: def defToSRI(s: str) -> str:
@ -153,7 +159,7 @@ def defToSRI(s: str) -> str:
@contextmanager @contextmanager
def atomicFileUpdate(target: Path): def atomicFileUpdate(target: Path):
'''Atomically replace the contents of a file. """Atomically replace the contents of a file.
Guarantees that no temporary files are left behind, and `target` is either Guarantees that no temporary files are left behind, and `target` is either
left untouched, or overwritten with new content if no exception was raised. left untouched, or overwritten with new content if no exception was raised.
@ -164,18 +170,20 @@ def atomicFileUpdate(target: Path):
Upon exiting the context, the files are closed; if no exception was Upon exiting the context, the files are closed; if no exception was
raised, `new` (atomically) replaces the `target`, otherwise it is deleted. raised, `new` (atomically) replaces the `target`, otherwise it is deleted.
''' """
# That's mostly copied from noto-emoji.py, should DRY it out # That's mostly copied from noto-emoji.py, should DRY it out
from tempfile import mkstemp from tempfile import NamedTemporaryFile
fd, _p = mkstemp(
dir = target.parent,
prefix = target.name,
)
tmpPath = Path(_p)
try: try:
with target.open() as original: with target.open() as original:
with tmpPath.open('w') as new: with NamedTemporaryFile(
dir = target.parent,
prefix = target.stem,
suffix = target.suffix,
delete = False,
mode="w", # otherwise the file would be opened in binary mode by default
) as new:
tmpPath = Path(new.name)
yield (original, new) yield (original, new)
tmpPath.replace(target) tmpPath.replace(target)
@ -188,37 +196,31 @@ def atomicFileUpdate(target: Path):
def fileToSRI(p: Path): def fileToSRI(p: Path):
with atomicFileUpdate(p) as (og, new): with atomicFileUpdate(p) as (og, new):
for i, line in enumerate(og): for i, line in enumerate(og):
with log_context(line=i): with log_context(line = i):
new.write(defToSRI(line)) new.write(defToSRI(line))
_SKIP_RE = re.compile( _SKIP_RE = re.compile("(generated by)|(do not edit)", re.IGNORECASE)
"(generated by)|(do not edit)",
re.IGNORECASE
)
if __name__ == "__main__": if __name__ == "__main__":
from sys import argv, stderr from sys import argv
logger.info("Starting!") logger.info("Starting!")
for arg in argv[1:]: def handleFile(p: Path, skipLevel = logging.INFO):
p = Path(arg) with log_context(file = str(p)):
with log_context(path=str(p)):
try: try:
if p.name == "yarn.nix" or p.name.find("generated") != -1:
logger.warning("File looks autogenerated, skipping!")
continue
with p.open() as f: with p.open() as f:
for line in f: for line in f:
if line.strip(): if line.strip():
break break
if _SKIP_RE.search(line): if _SKIP_RE.search(line):
logger.warning("File looks autogenerated, skipping!") logger.log(skipLevel, "File looks autogenerated, skipping!")
continue return
fileToSRI(p) fileToSRI(p)
except Exception as exn: except Exception as exn:
logger.error( logger.error(
"Unhandled exception, skipping file!", "Unhandled exception, skipping file!",
@ -226,3 +228,19 @@ if __name__ == "__main__":
) )
else: else:
logger.info("Finished processing file") logger.info("Finished processing file")
for arg in argv[1:]:
p = Path(arg)
with log_context(arg = arg):
if p.is_file():
handleFile(p, skipLevel = logging.WARNING)
elif p.is_dir():
logger.info("Recursing into directory")
for q in p.glob("**/*.nix"):
if q.is_file():
if q.name == "yarn.nix" or q.name.find("generated") != -1:
logger.info("File looks autogenerated, skipping!")
continue
handleFile(q)

View File

@ -159,7 +159,7 @@ let
if refindBinary != null then if refindBinary != null then
'' ''
# Adds rEFInd to the ISO. # Adds rEFInd to the ISO.
cp -v ${pkgs.refind}/share/refind/${refindBinary} $out/EFI/boot/ cp -v ${pkgs.refind}/share/refind/${refindBinary} $out/EFI/BOOT/
'' ''
else else
"# No refind for ${targetArch}" "# No refind for ${targetArch}"
@ -210,11 +210,11 @@ let
${ # When there is a theme configured, use it, otherwise use the background image. ${ # When there is a theme configured, use it, otherwise use the background image.
if config.isoImage.grubTheme != null then '' if config.isoImage.grubTheme != null then ''
# Sets theme. # Sets theme.
set theme=(\$root)/EFI/boot/grub-theme/theme.txt set theme=(\$root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts # Load theme fonts
$(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n") $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/BOOT/grub-theme/%P\n")
'' else '' '' else ''
if background_image (\$root)/EFI/boot/efi-background.png; then if background_image (\$root)/EFI/BOOT/efi-background.png; then
# Black background means transparent background when there # Black background means transparent background when there
# is a background image set... This seems undocumented :( # is a background image set... This seems undocumented :(
set color_normal=black/black set color_normal=black/black
@ -235,7 +235,7 @@ let
nativeBuildInputs = [ pkgs.buildPackages.grub2_efi ]; nativeBuildInputs = [ pkgs.buildPackages.grub2_efi ];
strictDeps = true; strictDeps = true;
} '' } ''
mkdir -p $out/EFI/boot/ mkdir -p $out/EFI/BOOT
# Add a marker so GRUB can find the filesystem. # Add a marker so GRUB can find the filesystem.
touch $out/EFI/nixos-installer-image touch $out/EFI/nixos-installer-image
@ -309,13 +309,13 @@ let
# probe for devices, even with --skip-fs-probe. # probe for devices, even with --skip-fs-probe.
grub-mkimage \ grub-mkimage \
--directory=${grubPkgs.grub2_efi}/lib/grub/${grubPkgs.grub2_efi.grubTarget} \ --directory=${grubPkgs.grub2_efi}/lib/grub/${grubPkgs.grub2_efi.grubTarget} \
-o $out/EFI/boot/boot${targetArch}.efi \ -o $out/EFI/BOOT/BOOT${lib.toUpper targetArch}.EFI \
-p /EFI/boot \ -p /EFI/BOOT \
-O ${grubPkgs.grub2_efi.grubTarget} \ -O ${grubPkgs.grub2_efi.grubTarget} \
''${MODULES[@]} ''${MODULES[@]}
cp ${grubPkgs.grub2_efi}/share/grub/unicode.pf2 $out/EFI/boot/ cp ${grubPkgs.grub2_efi}/share/grub/unicode.pf2 $out/EFI/BOOT/
cat <<EOF > $out/EFI/boot/grub.cfg cat <<EOF > $out/EFI/BOOT/grub.cfg
set textmode=${lib.boolToString (config.isoImage.forceTextMode)} set textmode=${lib.boolToString (config.isoImage.forceTextMode)}
set timeout=${toString grubEfiTimeout} set timeout=${toString grubEfiTimeout}
@ -331,12 +331,12 @@ let
${grubMenuCfg} ${grubMenuCfg}
hiddenentry 'Text mode' --hotkey 't' { hiddenentry 'Text mode' --hotkey 't' {
loadfont (\$root)/EFI/boot/unicode.pf2 loadfont (\$root)/EFI/BOOT/unicode.pf2
set textmode=true set textmode=true
terminal_output console terminal_output console
} }
hiddenentry 'GUI mode' --hotkey 'g' { hiddenentry 'GUI mode' --hotkey 'g' {
$(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n") $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/BOOT/grub-theme/%P\n")
set textmode=false set textmode=false
terminal_output gfxterm terminal_output gfxterm
} }
@ -411,7 +411,7 @@ let
# Force root to be the FAT partition # Force root to be the FAT partition
# Otherwise it breaks rEFInd's boot # Otherwise it breaks rEFInd's boot
search --set=root --no-floppy --fs-uuid 1234-5678 search --set=root --no-floppy --fs-uuid 1234-5678
chainloader (\$root)/EFI/boot/${refindBinary} chainloader (\$root)/EFI/BOOT/${refindBinary}
} }
fi fi
''} ''}
@ -427,7 +427,7 @@ let
} }
EOF EOF
grub-script-check $out/EFI/boot/grub.cfg grub-script-check $out/EFI/BOOT/grub.cfg
${refind} ${refind}
''; '';
@ -440,8 +440,8 @@ let
# dates (cp -p, touch, mcopy -m, faketime for label), IDs (mkfs.vfat -i) # dates (cp -p, touch, mcopy -m, faketime for label), IDs (mkfs.vfat -i)
'' ''
mkdir ./contents && cd ./contents mkdir ./contents && cd ./contents
mkdir -p ./EFI/boot mkdir -p ./EFI/BOOT
cp -rp "${efiDir}"/EFI/boot/{grub.cfg,*.efi} ./EFI/boot cp -rp "${efiDir}"/EFI/BOOT/{grub.cfg,*.EFI,*.efi} ./EFI/BOOT
# Rewrite dates for everything in the FS # Rewrite dates for everything in the FS
find . -exec touch --date=2000-01-01 {} + find . -exec touch --date=2000-01-01 {} +
@ -836,11 +836,11 @@ in
{ source = "${efiDir}/EFI"; { source = "${efiDir}/EFI";
target = "/EFI"; target = "/EFI";
} }
{ source = (pkgs.writeTextDir "grub/loopback.cfg" "source /EFI/boot/grub.cfg") + "/grub"; { source = (pkgs.writeTextDir "grub/loopback.cfg" "source /EFI/BOOT/grub.cfg") + "/grub";
target = "/boot/grub"; target = "/boot/grub";
} }
{ source = config.isoImage.efiSplashImage; { source = config.isoImage.efiSplashImage;
target = "/EFI/boot/efi-background.png"; target = "/EFI/BOOT/efi-background.png";
} }
] ++ lib.optionals (config.boot.loader.grub.memtest86.enable && config.isoImage.makeBiosBootable) [ ] ++ lib.optionals (config.boot.loader.grub.memtest86.enable && config.isoImage.makeBiosBootable) [
{ source = "${pkgs.memtest86plus}/memtest.bin"; { source = "${pkgs.memtest86plus}/memtest.bin";
@ -848,7 +848,7 @@ in
} }
] ++ lib.optionals (config.isoImage.grubTheme != null) [ ] ++ lib.optionals (config.isoImage.grubTheme != null) [
{ source = config.isoImage.grubTheme; { source = config.isoImage.grubTheme;
target = "/EFI/boot/grub-theme"; target = "/EFI/BOOT/grub-theme";
} }
]; ];

View File

@ -157,7 +157,7 @@ in {
continue continue
fi fi
'') cfg.params)} '') cfg.params)}
rm $file rm "$file"
done done
# TODO: Ideally this would be removing the *former* cfg.path, though # TODO: Ideally this would be removing the *former* cfg.path, though

View File

@ -198,6 +198,7 @@ in
IOSchedulingClass = cfg.daemonIOSchedClass; IOSchedulingClass = cfg.daemonIOSchedClass;
IOSchedulingPriority = cfg.daemonIOSchedPriority; IOSchedulingPriority = cfg.daemonIOSchedPriority;
LimitNOFILE = 1048576; LimitNOFILE = 1048576;
Delegate = "yes";
}; };
restartTriggers = [ config.environment.etc."nix/nix.conf".source ]; restartTriggers = [ config.environment.etc."nix/nix.conf".source ];

View File

@ -34,13 +34,24 @@ in
description = "Database user."; description = "Database user.";
}; };
url = lib.mkOption {
type = lib.types.str;
default = "postgres://${config.services.windmill.database.name}?host=/var/run/postgresql";
defaultText = lib.literalExpression ''
"postgres://\$\{config.services.windmill.database.name}?host=/var/run/postgresql";
'';
description = "Database url. Note that any secret here would be world-readable. Use `services.windmill.database.urlPath` unstead to include secrets in the url.";
};
urlPath = lib.mkOption { urlPath = lib.mkOption {
type = lib.types.path; type = lib.types.nullOr lib.types.path;
description = '' description = ''
Path to the file containing the database url windmill should connect to. This is not deducted from database user and name as it might contain a secret Path to the file containing the database url windmill should connect to. This is not deducted from database user and name as it might contain a secret
''; '';
default = null;
example = "config.age.secrets.DATABASE_URL_FILE.path"; example = "config.age.secrets.DATABASE_URL_FILE.path";
}; };
createLocally = lib.mkOption { createLocally = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
@ -50,6 +61,10 @@ in
baseUrl = lib.mkOption { baseUrl = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "https://localhost:${toString config.services.windmill.serverPort}";
defaultText = lib.literalExpression ''
"https://localhost:\$\{toString config.services.windmill.serverPort}";
'';
description = '' description = ''
The base url that windmill will be served on. The base url that windmill will be served on.
''; '';
@ -79,6 +94,7 @@ in
systemd.services = systemd.services =
let let
useUrlPath = (cfg.database.urlPath != null);
serviceConfig = { serviceConfig = {
DynamicUser = true; DynamicUser = true;
# using the same user to simplify db connection # using the same user to simplify db connection
@ -86,10 +102,16 @@ in
ExecStart = "${pkgs.windmill}/bin/windmill"; ExecStart = "${pkgs.windmill}/bin/windmill";
Restart = "always"; Restart = "always";
} // lib.optionalAttrs useUrlPath {
LoadCredential = [ LoadCredential = [
"DATABASE_URL_FILE:${cfg.database.urlPath}" "DATABASE_URL_FILE:${cfg.database.urlPath}"
]; ];
}; };
db_url_envs = lib.optionalAttrs useUrlPath {
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
} // lib.optionalAttrs (!useUrlPath) {
DATABASE_URL = cfg.database.url;
};
in in
{ {
@ -132,12 +154,11 @@ EOF
serviceConfig = serviceConfig // { StateDirectory = "windmill";}; serviceConfig = serviceConfig // { StateDirectory = "windmill";};
environment = { environment = {
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
PORT = builtins.toString cfg.serverPort; PORT = builtins.toString cfg.serverPort;
WM_BASE_URL = cfg.baseUrl; WM_BASE_URL = cfg.baseUrl;
RUST_LOG = cfg.logLevel; RUST_LOG = cfg.logLevel;
MODE = "server"; MODE = "server";
}; } // db_url_envs;
}; };
windmill-worker = { windmill-worker = {
@ -148,13 +169,12 @@ EOF
serviceConfig = serviceConfig // { StateDirectory = "windmill-worker";}; serviceConfig = serviceConfig // { StateDirectory = "windmill-worker";};
environment = { environment = {
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
WM_BASE_URL = cfg.baseUrl; WM_BASE_URL = cfg.baseUrl;
RUST_LOG = cfg.logLevel; RUST_LOG = cfg.logLevel;
MODE = "worker"; MODE = "worker";
WORKER_GROUP = "default"; WORKER_GROUP = "default";
KEEP_JOB_DIR = "false"; KEEP_JOB_DIR = "false";
}; } // db_url_envs;
}; };
windmill-worker-native = { windmill-worker-native = {
@ -165,12 +185,11 @@ EOF
serviceConfig = serviceConfig // { StateDirectory = "windmill-worker-native";}; serviceConfig = serviceConfig // { StateDirectory = "windmill-worker-native";};
environment = { environment = {
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
WM_BASE_URL = cfg.baseUrl; WM_BASE_URL = cfg.baseUrl;
RUST_LOG = cfg.logLevel; RUST_LOG = cfg.logLevel;
MODE = "worker"; MODE = "worker";
WORKER_GROUP = "native"; WORKER_GROUP = "native";
}; } // db_url_envs;
}; };
}; };
}; };

View File

@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.services.xserver.desktopManager.phosh; cfg = config.services.xserver.desktopManager.phosh;
@ -21,29 +18,29 @@ let
}; };
}; };
phocConfigType = types.submodule { phocConfigType = lib.types.submodule {
options = { options = {
xwayland = mkOption { xwayland = lib.mkOption {
description = '' description = ''
Whether to enable XWayland support. Whether to enable XWayland support.
To start XWayland immediately, use `immediate`. To start XWayland immediately, use `immediate`.
''; '';
type = types.enum [ "true" "false" "immediate" ]; type = lib.types.enum [ "true" "false" "immediate" ];
default = "false"; default = "false";
}; };
cursorTheme = mkOption { cursorTheme = lib.mkOption {
description = '' description = ''
Cursor theme to use in Phosh. Cursor theme to use in Phosh.
''; '';
type = types.str; type = lib.types.str;
default = "default"; default = "default";
}; };
outputs = mkOption { outputs = lib.mkOption {
description = '' description = ''
Output configurations. Output configurations.
''; '';
type = types.attrsOf phocOutputType; type = lib.types.attrsOf phocOutputType;
default = { default = {
DSI-1 = { DSI-1 = {
scale = 2; scale = 2;
@ -53,34 +50,34 @@ let
}; };
}; };
phocOutputType = types.submodule { phocOutputType = lib.types.submodule {
options = { options = {
modeline = mkOption { modeline = lib.mkOption {
description = '' description = ''
One or more modelines. One or more modelines.
''; '';
type = types.either types.str (types.listOf types.str); type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
default = []; default = [];
example = [ example = [
"87.25 720 776 848 976 1440 1443 1453 1493 -hsync +vsync" "87.25 720 776 848 976 1440 1443 1453 1493 -hsync +vsync"
"65.13 768 816 896 1024 1024 1025 1028 1060 -HSync +VSync" "65.13 768 816 896 1024 1024 1025 1028 1060 -HSync +VSync"
]; ];
}; };
mode = mkOption { mode = lib.mkOption {
description = '' description = ''
Default video mode. Default video mode.
''; '';
type = types.nullOr types.str; type = lib.types.nullOr lib.types.str;
default = null; default = null;
example = "768x1024"; example = "768x1024";
}; };
scale = mkOption { scale = lib.mkOption {
description = '' description = ''
Display scaling factor. Display scaling factor.
''; '';
type = types.nullOr ( type = lib.types.nullOr (
types.addCheck lib.types.addCheck
(types.either types.int types.float) (lib.types.either lib.types.int lib.types.float)
(x : x > 0) (x : x > 0)
) // { ) // {
description = "null or positive integer or float"; description = "null or positive integer or float";
@ -88,11 +85,11 @@ let
default = null; default = null;
example = 2; example = 2;
}; };
rotate = mkOption { rotate = lib.mkOption {
description = '' description = ''
Screen transformation. Screen transformation.
''; '';
type = types.enum [ type = lib.types.enum [
"90" "180" "270" "flipped" "flipped-90" "flipped-180" "flipped-270" null "90" "180" "270" "flipped" "flipped-90" "flipped-180" "flipped-270" null
]; ];
default = null; default = null;
@ -100,7 +97,7 @@ let
}; };
}; };
optionalKV = k: v: optionalString (v != null) "${k} = ${builtins.toString v}"; optionalKV = k: v: lib.optionalString (v != null) "${k} = ${builtins.toString v}";
renderPhocOutput = name: output: let renderPhocOutput = name: output: let
modelines = if builtins.isList output.modeline modelines = if builtins.isList output.modeline
@ -109,18 +106,18 @@ let
renderModeline = l: "modeline = ${l}"; renderModeline = l: "modeline = ${l}";
in '' in ''
[output:${name}] [output:${name}]
${concatStringsSep "\n" (map renderModeline modelines)} ${lib.concatStringsSep "\n" (map renderModeline modelines)}
${optionalKV "mode" output.mode} ${optionalKV "mode" output.mode}
${optionalKV "scale" output.scale} ${optionalKV "scale" output.scale}
${optionalKV "rotate" output.rotate} ${optionalKV "rotate" output.rotate}
''; '';
renderPhocConfig = phoc: let renderPhocConfig = phoc: let
outputs = mapAttrsToList renderPhocOutput phoc.outputs; outputs = lib.mapAttrsToList renderPhocOutput phoc.outputs;
in '' in ''
[core] [core]
xwayland = ${phoc.xwayland} xwayland = ${phoc.xwayland}
${concatStringsSep "\n" outputs} ${lib.concatStringsSep "\n" outputs}
[cursor] [cursor]
theme = ${phoc.cursorTheme} theme = ${phoc.cursorTheme}
''; '';
@ -129,37 +126,37 @@ in
{ {
options = { options = {
services.xserver.desktopManager.phosh = { services.xserver.desktopManager.phosh = {
enable = mkOption { enable = lib.mkOption {
type = types.bool; type = lib.types.bool;
default = false; default = false;
description = "Enable the Phone Shell."; description = "Enable the Phone Shell.";
}; };
package = mkPackageOption pkgs "phosh" { }; package = lib.mkPackageOption pkgs "phosh" { };
user = mkOption { user = lib.mkOption {
description = "The user to run the Phosh service."; description = "The user to run the Phosh service.";
type = types.str; type = lib.types.str;
example = "alice"; example = "alice";
}; };
group = mkOption { group = lib.mkOption {
description = "The group to run the Phosh service."; description = "The group to run the Phosh service.";
type = types.str; type = lib.types.str;
example = "users"; example = "users";
}; };
phocConfig = mkOption { phocConfig = lib.mkOption {
description = '' description = ''
Configurations for the Phoc compositor. Configurations for the Phoc compositor.
''; '';
type = types.oneOf [ types.lines types.path phocConfigType ]; type = lib.types.oneOf [ lib.types.lines lib.types.path phocConfigType ];
default = {}; default = {};
}; };
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
systemd.defaultUnit = "graphical.target"; systemd.defaultUnit = "graphical.target";
# Inspired by https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/data/phosh.service # Inspired by https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/data/phosh.service
systemd.services.phosh = { systemd.services.phosh = {
@ -216,7 +213,7 @@ in
security.pam.services.phosh = {}; security.pam.services.phosh = {};
hardware.graphics.enable = mkDefault true; hardware.graphics.enable = lib.mkDefault true;
services.gnome.core-shell.enable = true; services.gnome.core-shell.enable = true;
services.gnome.core-os-services.enable = true; services.gnome.core-os-services.enable = true;

View File

@ -8,6 +8,10 @@ in
{ {
imports = [
(mkRemovedOptionModule [ "hardware" "parallels" "autoMountShares" ] "Shares are always automatically mounted since Parallels Desktop 20.")
];
options = { options = {
hardware.parallels = { hardware.parallels = {
@ -20,17 +24,6 @@ in
''; '';
}; };
autoMountShares = mkOption {
type = types.bool;
default = true;
description = ''
Control prlfsmountd service. When this service is running, shares can not be manually
mounted through `mount -t prl_fs ...` as this service will remount and trample any set options.
Recommended to enable for simple file sharing, but extended share use such as for code should
disable this to manually mount shares.
'';
};
package = mkOption { package = mkOption {
type = types.nullOr types.package; type = types.nullOr types.package;
default = config.boot.kernelPackages.prl-tools; default = config.boot.kernelPackages.prl-tools;
@ -68,19 +61,6 @@ in
}; };
}; };
systemd.services.prlfsmountd = mkIf config.hardware.parallels.autoMountShares {
description = "Parallels Guest File System Sharing Tool";
wantedBy = [ "multi-user.target" ];
path = [ prl-tools ];
serviceConfig = rec {
ExecStart = "${prl-tools}/sbin/prlfsmountd ${PIDFile}";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /media";
ExecStopPost = "${prl-tools}/sbin/prlfsmountd -u";
PIDFile = "/run/prlfsmountd.pid";
WorkingDirectory = "${prl-tools}/bin";
};
};
systemd.services.prlshprint = { systemd.services.prlshprint = {
description = "Parallels Printing Tool"; description = "Parallels Printing Tool";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -20,7 +20,7 @@ in {
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
# type path mode user group age arg # type path mode user group age arg
" d /git 0755 root root - -" " d /git 0755 git git - -"
]; ];
services.gitDaemon = { services.gitDaemon = {
@ -56,6 +56,10 @@ in {
"rm -r /project", "rm -r /project",
) )
# Change user/group to default daemon user/group from module
# to avoid "fatal: detected dubious ownership in repository at '/git/project.git'"
server.succeed("chown git:git -R /git/project.git")
with subtest("git daemon starts"): with subtest("git daemon starts"):
server.wait_for_unit("git-daemon.service") server.wait_for_unit("git-daemon.service")

View File

@ -24,6 +24,14 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-oMgdz2dny0u1XV13aHu5s8/pcAz8z/SAOf4hbCDsdjw"; hash = "sha256-oMgdz2dny0u1XV13aHu5s8/pcAz8z/SAOf4hbCDsdjw";
}; };
# FIX: The "Support Debian non-standard python paths" resolves to store path of python
postPatch = ''
substituteInPlace meson.build \
--replace-fail \
'from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix=""))' \
"print(\"$out/${python3Packages.python.sitePackages}\")"
'';
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fulcrum"; pname = "fulcrum";
version = "1.11.0"; version = "1.11.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cculianu"; owner = "cculianu";
repo = "Fulcrum"; repo = "Fulcrum";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-VY6yUdmU8MLwSH3VeAWCGbdouOxGrhDc1usYj70jrd8="; sha256 = "sha256-+hBc7jW1MVLVjYXNOV7QvFJJpZ5RzW5/c9NdqOXrsj0=";
}; };
nativeBuildInputs = [ pkg-config qmake ]; nativeBuildInputs = [ pkg-config qmake ];

View File

@ -15,11 +15,11 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "nano"; pname = "nano";
version = "8.1"; version = "8.2";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/nano/${pname}-${version}.tar.xz"; url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
hash = "sha256-k7Pj6RVa44n+nM+ct6s4DqwpYCg1ujB3si9k0PDL6Ms="; hash = "sha256-1a0H3YYvrK4DBRxUxlNeVMftdAcxh4P8rRrS1wdv/+s=";
}; };
nativeBuildInputs = [ texinfo ] ++ lib.optional enableNls gettext; nativeBuildInputs = [ texinfo ] ++ lib.optional enableNls gettext;

View File

@ -4,9 +4,17 @@ self: super:
let let
inherit (neovimUtils) grammarToPlugin; inherit (neovimUtils) grammarToPlugin;
generatedGrammars = callPackage ./generated.nix {
initialGeneratedGrammars = callPackage ./generated.nix {
inherit (tree-sitter) buildGrammar; inherit (tree-sitter) buildGrammar;
}; };
grammarOverrides = final: prev: {
nix = prev.nix.overrideAttrs {
# workaround for https://github.com/NixOS/nixpkgs/issues/332580
prePatch = "rm queries/highlights.scm";
};
};
generatedGrammars = lib.fix (lib.extends grammarOverrides (_: initialGeneratedGrammars));
generatedDerivations = lib.filterAttrs (_: lib.isDerivation) generatedGrammars; generatedDerivations = lib.filterAttrs (_: lib.isDerivation) generatedGrammars;
@ -36,22 +44,8 @@ let
# pkgs.vimPlugins.nvim-treesitter.withAllGrammars # pkgs.vimPlugins.nvim-treesitter.withAllGrammars
withPlugins = withPlugins =
f: self.nvim-treesitter.overrideAttrs { f: self.nvim-treesitter.overrideAttrs {
passthru.dependencies = passthru.dependencies = map grammarToPlugin
let (f (tree-sitter.builtGrammars // builtGrammars));
grammars = map grammarToPlugin
(f (tree-sitter.builtGrammars // builtGrammars));
copyGrammar = grammar:
let name = lib.last (lib.splitString "-" grammar.name); in
"ln -sf ${grammar}/parser/${name}.so $out/parser/${name}.so";
in
[
(runCommand "vimplugin-treesitter-grammars"
{ meta.platforms = lib.platforms.all; }
''
mkdir -p $out/parser
${lib.concatMapStringsSep "\n" copyGrammar grammars}
'')
];
}; };
withAllGrammars = withPlugins (_: allGrammars); withAllGrammars = withPlugins (_: allGrammars);

View File

@ -39,6 +39,8 @@ stdenv.mkDerivation rec {
# fiddle with the terminal. # fiddle with the terminal.
doCheck = false; doCheck = false;
env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";
# XXX: Work around cross-compilation-unfriendly `gl_FUNC_FSTATAT' macro. # XXX: Work around cross-compilation-unfriendly `gl_FUNC_FSTATAT' macro.
gl_cv_func_fstatat_zero_flag="yes"; gl_cv_func_fstatat_zero_flag="yes";

View File

@ -84,6 +84,10 @@
}: }:
let let
embreeSupport = (!stdenv.isAarch64 && stdenv.isLinux) || stdenv.isDarwin;
openImageDenoiseSupport = (!stdenv.isAarch64 && stdenv.isLinux) || stdenv.isDarwin;
openUsdSupport = !stdenv.isDarwin;
python3 = python3Packages.python; python3 = python3Packages.python;
pyPkgsOpenusd = python3Packages.openusd.override { withOsl = false; }; pyPkgsOpenusd = python3Packages.openusd.override { withOsl = false; };
@ -163,8 +167,10 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_CODEC_SNDFILE=ON" "-DWITH_CODEC_SNDFILE=ON"
"-DWITH_CPU_CHECK=OFF" "-DWITH_CPU_CHECK=OFF"
"-DWITH_CYCLES_DEVICE_OPTIX=${if cudaSupport then "ON" else "OFF"}" "-DWITH_CYCLES_DEVICE_OPTIX=${if cudaSupport then "ON" else "OFF"}"
"-DWITH_CYCLES_EMBREE=${if embreeSupport then "ON" else "OFF"}"
"-DWITH_CYCLES_OSL=OFF" "-DWITH_CYCLES_OSL=OFF"
"-DWITH_FFTW3=ON" "-DWITH_FFTW3=ON"
"-DWITH_HYDRA=${if openUsdSupport then "ON" else "OFF"}"
"-DWITH_IMAGE_OPENJPEG=ON" "-DWITH_IMAGE_OPENJPEG=ON"
"-DWITH_INSTALL_PORTABLE=OFF" "-DWITH_INSTALL_PORTABLE=OFF"
"-DWITH_JACK=${if jackaudioSupport then "ON" else "OFF"}" "-DWITH_JACK=${if jackaudioSupport then "ON" else "OFF"}"
@ -172,6 +178,7 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_MOD_OCEANSIM=ON" "-DWITH_MOD_OCEANSIM=ON"
"-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}" "-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}"
"-DWITH_OPENCOLORIO=ON" "-DWITH_OPENCOLORIO=ON"
"-DWITH_OPENIMAGEDENOISE=${if openImageDenoiseSupport then "ON" else "OFF"}"
"-DWITH_OPENSUBDIV=ON" "-DWITH_OPENSUBDIV=ON"
"-DWITH_OPENVDB=ON" "-DWITH_OPENVDB=ON"
"-DWITH_PULSEAUDIO=OFF" "-DWITH_PULSEAUDIO=OFF"
@ -181,7 +188,7 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_SDL=OFF" "-DWITH_SDL=OFF"
"-DWITH_STRICT_BUILD_OPTIONS=ON" "-DWITH_STRICT_BUILD_OPTIONS=ON"
"-DWITH_TBB=ON" "-DWITH_TBB=ON"
"-DWITH_USD=ON" "-DWITH_USD=${if openUsdSupport then "ON" else "OFF"}"
# Blender supplies its own FindAlembic.cmake (incompatible with the Alembic-supplied config file) # Blender supplies its own FindAlembic.cmake (incompatible with the Alembic-supplied config file)
"-DALEMBIC_INCLUDE_DIR=${lib.getDev alembic}/include" "-DALEMBIC_INCLUDE_DIR=${lib.getDev alembic}/include"
@ -193,13 +200,9 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_GHOST_WAYLAND_DYNLOAD=OFF" "-DWITH_GHOST_WAYLAND_DYNLOAD=OFF"
"-DWITH_GHOST_WAYLAND_LIBDECOR=ON" "-DWITH_GHOST_WAYLAND_LIBDECOR=ON"
] ]
++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
"-DWITH_CYCLES_EMBREE=OFF"
]
++ lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
"-DLIBDIR=/does-not-exist" "-DLIBDIR=/does-not-exist"
"-DSSE2NEON_INCLUDE_DIR=${sse2neon}/lib" "-DSSE2NEON_INCLUDE_DIR=${sse2neon}/lib"
"-DWITH_USD=OFF" # currently fails on darwin
] ]
++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" # Clang doesn't support "-export-dynamic" ++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" # Clang doesn't support "-export-dynamic"
++ lib.optionals cudaSupport [ ++ lib.optionals cudaSupport [
@ -269,10 +272,8 @@ stdenv.mkDerivation (finalAttrs: {
zlib zlib
zstd zstd
] ]
++ lib.optionals (!stdenv.isAarch64 && stdenv.isLinux) [ ++ lib.optional embreeSupport embree
embree ++ lib.optional openImageDenoiseSupport (openimagedenoise.override { inherit cudaSupport; })
(openimagedenoise.override { inherit cudaSupport; })
]
++ ( ++ (
if (!stdenv.isDarwin) then if (!stdenv.isDarwin) then
[ [
@ -285,7 +286,6 @@ stdenv.mkDerivation (finalAttrs: {
libXxf86vm libXxf86vm
openal openal
openxr-loader openxr-loader
pyPkgsOpenusd
] ]
else else
[ [
@ -296,13 +296,12 @@ stdenv.mkDerivation (finalAttrs: {
OpenGL OpenGL
SDL SDL
brotli brotli
embree
llvmPackages.openmp llvmPackages.openmp
(openimagedenoise.override { inherit cudaSupport; })
sse2neon sse2neon
] ]
) )
++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]
++ lib.optionals openUsdSupport [ pyPkgsOpenusd ]
++ lib.optionals waylandSupport [ ++ lib.optionals waylandSupport [
dbus dbus
libdecor' libdecor'
@ -325,7 +324,7 @@ stdenv.mkDerivation (finalAttrs: {
ps.requests ps.requests
ps.zstandard ps.zstandard
] ]
++ lib.optionals (!stdenv.isDarwin) [ pyPkgsOpenusd ]; ++ lib.optional openUsdSupport [ pyPkgsOpenusd ];
blenderExecutable = blenderExecutable =
placeholder "out" placeholder "out"
@ -434,8 +433,7 @@ stdenv.mkDerivation (finalAttrs: {
"x86_64-linux" "x86_64-linux"
"aarch64-darwin" "aarch64-darwin"
]; ];
# the current apple sdk is too old (currently 11_0) and fails to build "metal" on x86_64-darwin broken = stdenv.isDarwin; # fails due to too-old SDK, using newer SDK fails to compile
broken = stdenv.hostPlatform.system == "x86_64-darwin";
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
amarshall amarshall
veprbl veprbl

View File

@ -1,29 +1,22 @@
{ lib { lib
, stdenv , stdenv
, fetchpatch
, nixosTests , nixosTests
, python3 , python3
, fetchPypi , fetchFromGitHub
, radicale3 , radicale3
}: }:
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication {
pname = "etesync-dav"; pname = "etesync-dav";
version = "0.32.1"; version = "0.32.1-unstable-2024-09-02";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "etesync";
hash = "sha256-pOLug5MnVdKaw5wedABewomID9LU0hZPCf4kZKKU1yA="; repo = "etesync-dav";
rev = "b9b23bf6fba60d42012008ba06023bccd9109c08";
hash = "sha256-wWhwnOlwE1rFgROTSj90hlSw4k48fIEdk5CJOXoecuQ=";
}; };
patches = [
(fetchpatch {
name = "add-missing-comma-in-setup.py.patch";
url = "https://github.com/etesync/etesync-dav/commit/040cb7b57205e70515019fb356e508a6414da11e.patch";
hash = "sha256-87IpIQ87rgpinvbRwUlWd0xeegn0zfVSiDFYNUqPerg=";
})
];
propagatedBuildInputs = with python3.pkgs; [ propagatedBuildInputs = with python3.pkgs; [
appdirs appdirs
etebase etebase

View File

@ -5,16 +5,16 @@
buildGoModule rec { buildGoModule rec {
pname = "uni"; pname = "uni";
version = "2.7.0"; version = "2.8.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "arp242"; owner = "arp242";
repo = "uni"; repo = "uni";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-ociPkuRtpBS+x1zSVNYk8oqAsJZGv31/TUUUlBOYhJA="; hash = "sha256-LSmQtndWBc7wCYBnyaeDb4Le4PQPcSO8lTp+CSC2jbc=";
}; };
vendorHash = "sha256-/PvBn2RRYuVpjnrIL1xAcVqAKZuIV2KTSyVtBW1kqj4="; vendorHash = "sha256-4w5L5Zg0LJX2v4mqLLjAvEdh3Ad69MLa97SR6RY3fT4=";
ldflags = [ ldflags = [
"-s" "-s"

View File

@ -2,13 +2,13 @@
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "yewtube"; pname = "yewtube";
version = "2.10.5"; version = "2.12.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mps-youtube"; owner = "mps-youtube";
repo = "yewtube"; repo = "yewtube";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-a7ySRHSRHmQePaVV7HnCk8QsiAQfN4nCVRdamPMUHGo="; hash = "sha256-66cGnEEISC+lZAYhFXuVdDtwh1TgwvCP6nBD84z2z0I=";
}; };
postPatch = '' postPatch = ''

View File

@ -1,20 +1,20 @@
{ {
beta = import ./browser.nix { beta = import ./browser.nix {
channel = "beta"; channel = "beta";
version = "129.0.2792.12"; version = "129.0.2792.21";
revision = "1"; revision = "1";
hash = "sha256-LWu5DKCoGSFqUZqgvKx3aoZRzAf6FR3hJnk/agAV9sI="; hash = "sha256-NrDRroKyjY9zC9KoMWaEPAPnu+JNNDZwLVbuDvoUG1M=";
}; };
dev = import ./browser.nix { dev = import ./browser.nix {
channel = "dev"; channel = "dev";
version = "129.0.2792.10"; version = "130.0.2808.0";
revision = "1"; revision = "1";
hash = "sha256-jw/muaunLlrtZADrD7asVH+o/u3cp3NyvjRXqPWyHJI="; hash = "sha256-6mqStxS9HJvfKbrGqQGlqQKXc2SnvOycirPihfnkaLI=";
}; };
stable = import ./browser.nix { stable = import ./browser.nix {
channel = "stable"; channel = "stable";
version = "128.0.2739.54"; version = "128.0.2739.67";
revision = "1"; revision = "1";
hash = "sha256-qiLZExLU3f6l+qPEGiqOuDgjqOtSyhPwSt7kQfBBSyg="; hash = "sha256-Y8PxyAibuEhwKJpqnhtBy1F2Kn+ONw6NVtC25R+fFVo=";
}; };
} }

View File

@ -6,13 +6,13 @@
buildGoModule rec { buildGoModule rec {
pname = "gatekeeper"; pname = "gatekeeper";
version = "3.17.0"; version = "3.17.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "open-policy-agent"; owner = "open-policy-agent";
repo = "gatekeeper"; repo = "gatekeeper";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-33imFUFIonE5DTNwAKgJQd4jQ/lLap3LmVTqn9nxj98="; hash = "sha256-Tu4p0kY0UdU0++zLpj+6A5ky5OXEEN5iivHbiyvghw4=";
}; };
vendorHash = null; vendorHash = null;

View File

@ -8,16 +8,16 @@
buildGoModule rec { buildGoModule rec {
pname = "k0sctl"; pname = "k0sctl";
version = "0.18.1"; version = "0.19.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "k0sproject"; owner = "k0sproject";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-lZCD8hBe6SKKjTvEKNg/lr7NXrAPqFQoh9iQg0O6jhc="; hash = "sha256-86MLQdXc10bvDFeq3ImD19ytjVPVD19eJzicIo6oJZc=";
}; };
vendorHash = "sha256-FobBn7rbRVfnW8Zd982vkSuKpPj4gGK4b41o9OK/CCY="; vendorHash = "sha256-eKim5F8bKC1UOY+lOo0NSHOzXuMOcnBjkjm3/vDkGEM=";
ldflags = [ ldflags = [
"-s" "-s"

View File

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "roxctl"; pname = "roxctl";
version = "4.5.1"; version = "4.5.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "stackrox"; owner = "stackrox";
repo = "stackrox"; repo = "stackrox";
rev = version; rev = version;
sha256 = "sha256-EYhp07G4a3dhnNrWzz6BtFpcgoYHosGdY2sDUYcS9QA="; sha256 = "sha256-dJtqUYH6TUEb3IMSzVg3NBi1UYGvUPDQUaQ9h19a3NY=";
}; };
vendorHash = "sha256-Z7EkKVrwTzoD1BwaPhLr6XVtq/dctPJwH+KgyN3ZbUU="; vendorHash = "sha256-qDSi1Jk6erSCwPiLubdVlqOT6PQygMQghS8leieJ78s=";
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];

View File

@ -15,25 +15,18 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "localproxy"; pname = "localproxy";
version = "3.1.1"; version = "3.1.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aws-samples"; owner = "aws-samples";
repo = "aws-iot-securetunneling-localproxy"; repo = "aws-iot-securetunneling-localproxy";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-voUKfXa43mOltePQEXgmJ2EBaN06E6R/2Zz6O09ogyY="; hash = "sha256-bIJLGJhSzBVqJaTWJj4Pmw/shA4Y0CzX4HhHtQZjfj0=";
}; };
patches = [ patches = [
# gcc-13 compatibility fix:
# https://github.com/aws-samples/aws-iot-securetunneling-localproxy/pull/136
(fetchpatch { (fetchpatch {
name = "gcc-13-part-1.patch"; name = "gcc-13.patch";
url = "https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/f6ba73eaede61841534623cdb01b69d793124f4b.patch";
hash = "sha256-sB9GuEuHLyj6DXNPuYAMibUJXdkThKbS/fxvnJU3rS4=";
})
(fetchpatch {
name = "gcc-13-part-2.patch";
url = "https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/de8779630d14e4f4969c9b171d826acfa847822b.patch"; url = "https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/de8779630d14e4f4969c9b171d826acfa847822b.patch";
hash = "sha256-11k6mRvCx72+5G/5LZZx2qnx10yfKpcAZofn8t8BD3E="; hash = "sha256-11k6mRvCx72+5G/5LZZx2qnx10yfKpcAZofn8t8BD3E=";
}) })
@ -43,6 +36,10 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ openssl protobuf catch2 boost icu ]; buildInputs = [ openssl protobuf catch2 boost icu ];
postPatch = ''
sed -i '/set(OPENSSL_USE_STATIC_LIBS TRUE)/d' CMakeLists.txt
'';
# causes redefinition of _FORTIFY_SOURCE # causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ]; hardeningDisable = [ "fortify3" ];

View File

@ -33,7 +33,8 @@ mkDerivation rec {
# fixup and install desktop file # fixup and install desktop file
desktop-file-install --dir $out/share/applications \ desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value $binary \ --set-key Exec --set-value SoulseekQt \
--set-key Terminal --set-value false \
--set-key Comment --set-value "${meta.description}" \ --set-key Comment --set-value "${meta.description}" \
--set-key Categories --set-value Network ${appextracted}/default.desktop --set-key Categories --set-value Network ${appextracted}/default.desktop
mv $out/share/applications/default.desktop $out/share/applications/SoulseekQt.desktop mv $out/share/applications/default.desktop $out/share/applications/SoulseekQt.desktop

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "morgen"; pname = "morgen";
version = "3.5.5"; version = "3.5.6";
src = fetchurl { src = fetchurl {
url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb"; url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb";
hash = "sha256-xT/mV54L2tXiQnUR7K/h61FsHtF16siEExM/I0mSy+8="; hash = "sha256-knguIcvGCwlI83DIaX/EYt/15azMoxEWNtFIXYqLops=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "New symbolic model checker for the analysis of synchronous finite-state and infinite-state systems"; description = "New symbolic model checker for the analysis of synchronous finite-state and infinite-state systems";
homepage = "https://nuxmv.fbk.eu/pmwiki.php"; homepage = "https://nusmv.fbk.eu/";
maintainers = with maintainers; [ mgttlinger ]; maintainers = with maintainers; [ mgttlinger ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = platforms.linux; platforms = platforms.linux;

View File

@ -20,11 +20,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "verifast"; pname = "verifast";
version = "21.04"; version = "24.08.30";
src = fetchurl { src = fetchurl {
url = "https://github.com/verifast/verifast/releases/download/${version}/${pname}-${version}-linux.tar.gz"; url = "https://github.com/verifast/verifast/releases/download/${version}/${pname}-${version}-linux.tar.gz";
sha256 = "sha256-PlRsf4wFXoM+E+60SbeKzs/RZK0HNVirX47AnI6NeYM="; sha256 = "sha256-hIS5e+zVlxSOqr1/ZDy0PangyWjB9uLCvN8Qr688msg=";
}; };
dontConfigure = true; dontConfigure = true;

View File

@ -7,10 +7,10 @@
# subset of files responsible for the vast majority of packaging tests, we can # subset of files responsible for the vast majority of packaging tests, we can
# think about moving this upstream. # think about moving this upstream.
[ [
"src/sage/env.py" # [1] "src/sage/env.py" # [1]
"src/sage/misc/persist.pyx" # [1] "src/sage/misc/persist.pyx" # [1]
"src/sage/misc/inline_fortran.py" # [1] "src/sage/misc/inline_fortran.py" # [1]
"src/sage/repl/ipython_extension.py" # [1] "src/sage/repl/ipython_extension.py" # [1]
] ]
# Numbered list of past failures to annotate files with # Numbered list of past failures to annotate files with

View File

@ -55,16 +55,16 @@ let
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "rio"; pname = "rio";
version = "0.1.10"; version = "0.1.13";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "raphamorim"; owner = "raphamorim";
repo = "rio"; repo = "rio";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-S42is3wqjBvYgysQ6yDUAn7ZEy9xJBmQD/emYAQfCkw="; hash = "sha256-JrmjQjKpL9di66z4IYTcWhNBL0CgalqOhQgVDpkh6b0=";
}; };
cargoHash = "sha256-ILX3xrcz3tMnl7mUrwUAXv9ffaZKjSoSf8cZVQB10zk="; cargoHash = "sha256-KWdkpQY1F0RU3JViFrXEp+JW6xdaofEmp2SlAkzPMPU=";
nativeBuildInputs = [ nativeBuildInputs = [
ncurses ncurses
@ -123,7 +123,7 @@ rustPlatform.buildRustPackage rec {
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tornax otavio oluceps ]; maintainers = with lib.maintainers; [ tornax otavio oluceps ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
changelog = "https://github.com/raphamorim/rio/blob/v${version}/CHANGELOG.md"; changelog = "https://github.com/raphamorim/rio/blob/v${version}/docs/docs/releases.md";
mainProgram = "rio"; mainProgram = "rio";
# ---- corcovado/src/sys/unix/eventedfd.rs - sys::unix::eventedfd::EventedFd (line 31) stdout ---- # ---- corcovado/src/sys/unix/eventedfd.rs - sys::unix::eventedfd::EventedFd (line 31) stdout ----
# Test executable failed (exit status: 101). # Test executable failed (exit status: 101).

View File

@ -1,15 +1,15 @@
{ {
"version": "17.2.4", "version": "17.2.5",
"repo_hash": "0hj1v7w68axzdy2lwwc320zpg2r2qv2f9rl23yisni6975p03ayi", "repo_hash": "0l3s3k3v306ihn47lkj49b8vlly7v11clciwpf7ly4c5mwvwjlx6",
"yarn_hash": "10y540bxwaz355p9r4q34199aibadrd5p4d9ck2y3n6735k0hm74", "yarn_hash": "10y540bxwaz355p9r4q34199aibadrd5p4d9ck2y3n6735k0hm74",
"owner": "gitlab-org", "owner": "gitlab-org",
"repo": "gitlab", "repo": "gitlab",
"rev": "v17.2.4-ee", "rev": "v17.2.5-ee",
"passthru": { "passthru": {
"GITALY_SERVER_VERSION": "17.2.4", "GITALY_SERVER_VERSION": "17.2.5",
"GITLAB_PAGES_VERSION": "17.2.4", "GITLAB_PAGES_VERSION": "17.2.5",
"GITLAB_SHELL_VERSION": "14.37.0", "GITLAB_SHELL_VERSION": "14.37.0",
"GITLAB_ELASTICSEARCH_INDEXER_VERSION": "5.2.0", "GITLAB_ELASTICSEARCH_INDEXER_VERSION": "5.2.0",
"GITLAB_WORKHORSE_VERSION": "17.2.4" "GITLAB_WORKHORSE_VERSION": "17.2.5"
} }
} }

View File

@ -6,7 +6,7 @@
}: }:
let let
version = "17.2.4"; version = "17.2.5";
package_version = "v${lib.versions.major version}"; package_version = "v${lib.versions.major version}";
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}"; gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
@ -20,7 +20,7 @@ let
owner = "gitlab-org"; owner = "gitlab-org";
repo = "gitaly"; repo = "gitaly";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-Y+Yi5kH/0s+yMuD/90Tdxeshp9m0Mrx080jmWnq/zZ0="; hash = "sha256-R6GmIBU7rzLBsegcXPjc9Dxp9qe3tP6unqOsnyiozgw=";
}; };
vendorHash = "sha256-FqnGVRldhevJgBBvJcvGXzRaYWqSHzZiXIQmCNzJv+4="; vendorHash = "sha256-FqnGVRldhevJgBBvJcvGXzRaYWqSHzZiXIQmCNzJv+4=";

View File

@ -2,7 +2,7 @@
buildGoModule rec { buildGoModule rec {
pname = "gitlab-container-registry"; pname = "gitlab-container-registry";
version = "4.7.0"; version = "4.9.0";
rev = "v${version}-gitlab"; rev = "v${version}-gitlab";
# nixpkgs-update: no auto update # nixpkgs-update: no auto update
@ -10,10 +10,10 @@ buildGoModule rec {
owner = "gitlab-org"; owner = "gitlab-org";
repo = "container-registry"; repo = "container-registry";
inherit rev; inherit rev;
hash = "sha256-+71mqnXRMq0vE+T6V/JqIhP//zldQOEK7694IB5RSnc="; hash = "sha256-kBM5ICESRUwHlM9FeJEFQFTM2E2zIF6axOGOHNmloKo=";
}; };
vendorHash = "sha256-h4nLnmsQ52PU3tUbTCUwWN8LbYuSgzaDkqplEZcDAGM="; vendorHash = "sha256-nePIExsIWJgBDUrkkVBzc0qsYdfxR7GL1VhdWcVJnLg=";
postPatch = '' postPatch = ''
# Disable flaky inmemory storage driver test # Disable flaky inmemory storage driver test

View File

@ -2,14 +2,14 @@
buildGoModule rec { buildGoModule rec {
pname = "gitlab-pages"; pname = "gitlab-pages";
version = "17.2.4"; version = "17.2.5";
# nixpkgs-update: no auto update # nixpkgs-update: no auto update
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "gitlab-org"; owner = "gitlab-org";
repo = "gitlab-pages"; repo = "gitlab-pages";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-7sB2MjU1iwqrOK8dNb7a14NFtrJ/7yoT07tzYVyCSJ8="; hash = "sha256-5qksHuY7EzCoCMBxF4souvUz8xFstfzOZT3CF5YsV7M=";
}; };
vendorHash = "sha256-yNHeM8MExcLwv2Ga4vtBmPFBt/Rj7Gd4QQYDlnAIo+c="; vendorHash = "sha256-yNHeM8MExcLwv2Ga4vtBmPFBt/Rj7Gd4QQYDlnAIo+c=";

View File

@ -5,7 +5,7 @@ in
buildGoModule rec { buildGoModule rec {
pname = "gitlab-workhorse"; pname = "gitlab-workhorse";
version = "17.2.4"; version = "17.2.5";
# nixpkgs-update: no auto update # nixpkgs-update: no auto update
src = fetchFromGitLab { src = fetchFromGitLab {

View File

@ -813,11 +813,11 @@ GEM
gapic-common (>= 0.20.0, < 2.a) gapic-common (>= 0.20.0, < 2.a)
google-cloud-common (~> 1.0) google-cloud-common (~> 1.0)
google-cloud-errors (~> 1.0) google-cloud-errors (~> 1.0)
google-cloud-core (1.6.0) google-cloud-core (1.7.0)
google-cloud-env (~> 1.0) google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0) google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0) google-cloud-env (2.1.1)
faraday (>= 0.17.3, < 3.0) faraday (>= 1.0, < 3.a)
google-cloud-errors (1.3.0) google-cloud-errors (1.3.0)
google-cloud-location (0.6.0) google-cloud-location (0.6.0)
gapic-common (>= 0.20.0, < 2.a) gapic-common (>= 0.20.0, < 2.a)

View File

@ -2729,10 +2729,10 @@ src:
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0amp8vd16pzbdrfbp7k0k38rqxpwd88bkyp35l3x719hbb6l85za"; sha256 = "0dagdfx3rnk9xplnj19gqpqn41fd09xfn8lp2p75psihhnj2i03l";
type = "gem"; type = "gem";
}; };
version = "1.6.0"; version = "1.7.0";
}; };
google-cloud-env = { google-cloud-env = {
dependencies = ["faraday"]; dependencies = ["faraday"];
@ -2740,10 +2740,10 @@ src:
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "05gshdqscg4kil6ppfzmikyavsx449bxyj47j33r4n4p8swsqyb1"; sha256 = "16b9yjbrzal1cjkdbn29fl06ikjn1dpg1vdsjak1xvhpsp3vhjyg";
type = "gem"; type = "gem";
}; };
version = "1.6.0"; version = "2.1.1";
}; };
google-cloud-errors = { google-cloud-errors = {
groups = ["default"]; groups = ["default"];

View File

@ -255,7 +255,7 @@ let
if lib.isPath nugetDeps && !lib.isStorePath nugetDepsFile then if lib.isPath nugetDeps && !lib.isStorePath nugetDepsFile then
toString nugetDepsFile toString nugetDepsFile
else else
''$(mktemp -t "${finalAttrs.pname ? finalAttrs.finalPackage.name}-deps-XXXXXX.nix")''; ''$(mktemp -t "${finalAttrs.pname or finalAttrs.finalPackage.name}-deps-XXXXXX.nix")'';
nugetToNix = (nuget-to-nix.override { inherit dotnet-sdk; }); nugetToNix = (nuget-to-nix.override { inherit dotnet-sdk; });
}; };

View File

@ -31,41 +31,37 @@ stdenv.mkDerivation {
''; '';
installPhase = '' installPhase = ''
addDeps() runHook preInstall
{
if [ -f $1/nix-support/dotnet-assemblies ]
then
for i in $(cat $1/nix-support/dotnet-assemblies)
do
windowsPath=$(cygpath --windows $i)
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
addDeps $i addDeps() {
done if [ -f $1/nix-support/dotnet-assemblies ]; then
fi for i in $(cat $1/nix-support/dotnet-assemblies); do
windowsPath=$(cygpath --windows $i)
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
addDeps $i
done
fi
} }
for i in ${toString assemblyInputs} for i in ${toString assemblyInputs}; do
do windowsPath=$(cygpath --windows $i)
windowsPath=$(cygpath --windows $i) echo "Using assembly path: $windowsPath"
echo "Using assembly path: $windowsPath"
if [ "$assemblySearchPaths" = "" ] if [ "$assemblySearchPaths" = "" ]; then
then assemblySearchPaths="$windowsPath"
assemblySearchPaths="$windowsPath" else
else assemblySearchPaths="$assemblySearchPaths;$windowsPath"
assemblySearchPaths="$assemblySearchPaths;$windowsPath" fi
fi
addDeps $i addDeps $i
done done
echo "Assembly search paths are: $assemblySearchPaths" echo "Assembly search paths are: $assemblySearchPaths"
if [ "$assemblySearchPaths" != "" ] if [ "$assemblySearchPaths" != "" ]; then
then echo "Using assembly search paths args: $assemblySearchPathsArg"
echo "Using assembly search paths args: $assemblySearchPathsArg" export AssemblySearchPaths=$assemblySearchPaths
export AssemblySearchPaths=$assemblySearchPaths
fi fi
mkdir -p $out mkdir -p $out
@ -77,9 +73,10 @@ stdenv.mkDerivation {
mkdir -p $out/nix-support mkdir -p $out/nix-support
for i in ${toString assemblyInputs} for i in ${toString assemblyInputs}; do
do echo $i >> $out/nix-support/dotnet-assemblies
echo $i >> $out/nix-support/dotnet-assemblies
done done
runHook postInstall
''; '';
} }

View File

@ -28,27 +28,23 @@ dotnetenv.buildSolution {
slnFile = "Wrapper.sln"; slnFile = "Wrapper.sln";
assemblyInputs = [ application ]; assemblyInputs = [ application ];
preBuild = '' preBuild = ''
addRuntimeDeps() addRuntimeDeps() {
{ if [ -f $1/nix-support/dotnet-assemblies ]; then
if [ -f $1/nix-support/dotnet-assemblies ] for i in $(cat $1/nix-support/dotnet-assemblies); do
then windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
for i in $(cat $1/nix-support/dotnet-assemblies) assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
do
windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
addRuntimeDeps $i addRuntimeDeps $i
done done
fi fi
} }
export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g') export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g')
# Generate assemblySearchPaths string array contents # Generate assemblySearchPaths string array contents
for path in ${toString assemblyInputs} for path in ${toString assemblyInputs}; do
do assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", "
assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", " addRuntimeDeps $path
addRuntimeDeps $path
done done
sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \ sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \
@ -57,8 +53,8 @@ dotnetenv.buildSolution {
sed -e "s|@NAMESPACE@|${namespace}|g" \ sed -e "s|@NAMESPACE@|${namespace}|g" \
-e "s|@MAINCLASSNAME@|${mainClassName}|g" \ -e "s|@MAINCLASSNAME@|${mainClassName}|g" \
-e "s|@EXEPATH@|$exePath|g" \ -e "s|@EXEPATH@|$exePath|g" \
-e "s|@ASSEMBLYSEARCHPATH@|$assemblySearchArray|" \ -e "s|@ASSEMBLYSEARCHPATH@|$assemblySearchArray|" \
Wrapper/Wrapper.cs.in > Wrapper/Wrapper.cs Wrapper/Wrapper.cs.in > Wrapper/Wrapper.cs
''; '';
} }

View File

@ -49,11 +49,11 @@ in {
noisily = colors: verbose: '' noisily = colors: verbose: ''
noisily() { noisily() {
${lib.optionalString verbose '' ${lib.optionalString verbose ''
echo_colored -n "Running " echo_colored -n "Running "
echo $@ echo $@
''} ''}
$@ $@
} }
''; '';
} }

View File

@ -8,11 +8,11 @@
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "aldente"; pname = "aldente";
version = "1.27.3"; version = "1.28.2";
src = fetchurl { src = fetchurl {
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg"; url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
hash = "sha256-G6Kpfy1LE1VG/nTks4KU6doTKZeJT6gk6JtKmUEy6FI="; hash = "sha256-CgBH5PRlq6USfdE8ubHKAYNq1YzUmfIN7wAS4HfJvZU=";
}; };
dontBuild = true; dontBuild = true;
@ -39,7 +39,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
homepage = "https://apphousekitchen.com"; homepage = "https://apphousekitchen.com";
changelog = "https://github.com/davidwernhart/aldente-charge-limiter/releases/tag/${finalAttrs.version}"; changelog = "https://github.com/davidwernhart/aldente-charge-limiter/releases/tag/${finalAttrs.version}";
license = lib.licenses.unfree; license = lib.licenses.unfree;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ stepbrobd ]; maintainers = with lib.maintainers; [ stepbrobd ];
platforms = [ platforms = [
"aarch64-darwin" "aarch64-darwin"

View File

@ -17,11 +17,11 @@ buildGoModule rec {
vendorHash = "sha256-uz4pao8Y/Sb3fffi9d0lbWQEUMohbthA6t6k6PfQz2M="; vendorHash = "sha256-uz4pao8Y/Sb3fffi9d0lbWQEUMohbthA6t6k6PfQz2M=";
meta = { meta = {
description = "Tool for running self-hosted bridges with the Beeper Matrix server. "; description = "Tool for running self-hosted bridges with the Beeper Matrix server.";
homepage = "https://github.com/beeper/bridge-manager"; homepage = "https://github.com/beeper/bridge-manager";
license = lib.licenses.asl20; license = lib.licenses.asl20;
maintainers = [ lib.maintainers.heywoodlh ]; maintainers = [ lib.maintainers.heywoodlh ];
mainProgram = "bbctl"; mainProgram = "bbctl";
changelog = "https://github.com/beeper/bridge-manager/releases/tag/v{version}"; changelog = "https://github.com/beeper/bridge-manager/releases/tag/v${version}";
}; };
} }

View File

@ -0,0 +1,36 @@
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "binsider";
version = "0.1.0";
src = fetchFromGitHub {
owner = "orhun";
repo = "binsider";
rev = "v${version}";
hash = "sha256-+QgbSpiDKPTVdSm0teEab1O6OJZKEDpC2ZIZ728e69Y=";
};
cargoHash = "sha256-lXYTZ3nvLrfEgo7AY/qSQYpXsyrdJuQQw43xREezNn0=";
# Tests need the executable in target/debug/
preCheck = ''
cargo build
'';
meta = with lib; {
description = "Analyzer of executables using a terminal user interface";
homepage = "https://github.com/orhun/binsider";
license = with licenses; [
asl20 # or
mit
];
maintainers = with maintainers; [ samueltardieu ];
mainProgram = "binsider";
broken = stdenv.isDarwin || stdenv.isAarch64;
};
}

View File

@ -1,46 +1,50 @@
{ lib {
, rustPlatform lib,
, fetchFromGitHub rustPlatform,
, pkg-config fetchFromGitHub,
, libgit2 pkg-config,
, rust-jemalloc-sys libgit2,
, zlib rust-jemalloc-sys,
, stdenv zlib,
, darwin stdenv,
, git darwin,
git,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "biome"; pname = "biome";
version = "1.8.3"; version = "1.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "biomejs"; owner = "biomejs";
repo = "biome"; repo = "biome";
rev = "cli/v${version}"; rev = "cli/v${version}";
hash = "sha256-6/RYuaR4HBXLI7eKysyRcSOxONFlChpQuhzWHAlx2CM="; hash = "sha256-AVw7yhC/f5JkFw2sQZ5YgzeXXjoJ8BfGgsS5sRVV/wE=";
}; };
cargoHash = "sha256-ytGbiDamxkTCPjNTBMsW1YjK+qMZfktGG5mVUVdKV5I="; cargoHash = "sha256-Vz6GCDGdC2IUtBK5X/t/Q5LODFUSlUxPBTCIjgdw3XU=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
]; ];
buildInputs = [ buildInputs =
libgit2 [
rust-jemalloc-sys libgit2
zlib rust-jemalloc-sys
] ++ lib.optionals stdenv.isDarwin [ zlib
darwin.apple_sdk.frameworks.Security ]
]; ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
nativeCheckInputs = [ nativeCheckInputs = [
git git
]; ];
cargoBuildFlags = [ "-p=biome_cli" ]; cargoBuildFlags = [ "-p=biome_cli" ];
cargoTestFlags = cargoBuildFlags ++ cargoTestFlags =
cargoBuildFlags
++
# skip a broken test from v1.7.3 release # skip a broken test from v1.7.3 release
# this will be removed on the next version # this will be removed on the next version
[ "-- --skip=diagnostics::test::termination_diagnostic_size" ]; [ "-- --skip=diagnostics::test::termination_diagnostic_size" ];
@ -58,12 +62,15 @@ rustPlatform.buildRustPackage rec {
unset BIOME_VERSION unset BIOME_VERSION
''; '';
meta = with lib; { meta = {
description = "Toolchain of the web"; description = "Toolchain of the web";
homepage = "https://biomejs.dev/"; homepage = "https://biomejs.dev/";
changelog = "https://github.com/biomejs/biome/blob/${src.rev}/CHANGELOG.md"; changelog = "https://github.com/biomejs/biome/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ figsoda ]; maintainers = with lib.maintainers; [
figsoda
isabelroses
];
mainProgram = "biome"; mainProgram = "biome";
}; };
} }

View File

@ -10,7 +10,7 @@
buildNpmPackage rec { buildNpmPackage rec {
pname = "clever-tools"; pname = "clever-tools";
version = "3.8.2"; version = "3.8.3";
nodejs = nodejs_18; nodejs = nodejs_18;
@ -18,10 +18,10 @@ buildNpmPackage rec {
owner = "CleverCloud"; owner = "CleverCloud";
repo = "clever-tools"; repo = "clever-tools";
rev = version; rev = version;
hash = "sha256-cBFdxJrH/1l6YpvdJTeLQf1zl6pm3IbPryimtewh9fc="; hash = "sha256-70wyu8+Jb9kR5lIucBZG9UWIufMhsgMBMkT2ohGvE50=";
}; };
npmDepsHash = "sha256-cY7wB0IQPLHOOuOLunjeJASp1Ba7ri8cj05/2HveJ7A="; npmDepsHash = "sha256-LljwS6Rd/8WnGpxSHwCr87KWLaRR2i7sMdUuuprYiOE=";
dontNpmBuild = true; dontNpmBuild = true;

View File

@ -1,95 +1,112 @@
{ lib {
, stdenv lib,
, atk atk,
, cairo cairo,
, czkawka callPackage,
, darwin darwin,
, fetchFromGitHub fetchFromGitHub,
, gdk-pixbuf gdk-pixbuf,
, glib glib,
, gobject-introspection gobject-introspection,
, gtk4 gtk4,
, pango overrideSDK,
, overrideSDK pango,
, pkg-config pkg-config,
, rustPlatform rustPlatform,
, testers stdenv,
, wrapGAppsHook4 testers,
, xvfb-run wrapGAppsHook4,
xvfb-run,
}: }:
let let
pname = "czkawka";
version = "7.0.0";
src = fetchFromGitHub {
owner = "qarmin";
repo = "czkawka";
rev = version;
hash = "sha256-SOWtLmehh1F8SoDQ+9d7Fyosgzya5ZztCv8IcJZ4J94=";
};
cargoPatches = [ ./time.patch ];
cargoHash = "sha256-cQv8C0P3xizsvnJODkTMJQA98P4nYSCHFT75isJE6es=";
buildRustPackage' = rustPlatform.buildRustPackage.override { buildRustPackage' = rustPlatform.buildRustPackage.override {
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
}; };
self = buildRustPackage' {
pname = "czkawka";
version = "7.0.0";
src = fetchFromGitHub {
owner = "qarmin";
repo = "czkawka";
rev = self.version;
hash = "sha256-SOWtLmehh1F8SoDQ+9d7Fyosgzya5ZztCv8IcJZ4J94=";
};
cargoPatches = [
# Updates time and time-macros from Cargo.lock
./0000-time.diff
];
cargoHash = "sha256-cQv8C0P3xizsvnJODkTMJQA98P4nYSCHFT75isJE6es=";
nativeBuildInputs = [
gobject-introspection
pkg-config
wrapGAppsHook4
];
buildInputs =
[
atk
cairo
gdk-pixbuf
glib
gtk4
pango
]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
AppKit
Foundation
]
);
nativeCheckInputs = [ xvfb-run ];
strictDeps = true;
doCheck = stdenv.hostPlatform.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform);
checkPhase = ''
runHook preCheck
xvfb-run cargo test
runHook postCheck
'';
# Desktop items, icons and metainfo are not installed automatically
postInstall = ''
install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg
install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
'';
passthru = {
tests.version = testers.testVersion {
package = self;
command = "czkawka_cli --version";
};
wrapper = callPackage ./wrapper.nix {
czkawka = self;
};
};
meta = {
homepage = "https://github.com/qarmin/czkawka";
description = "Simple, fast and easy to use app to remove unnecessary files from your computer";
changelog = "https://github.com/qarmin/czkawka/raw/${self.version}/Changelog.md";
license = with lib.licenses; [ mit ];
mainProgram = "czkawka_gui";
maintainers = with lib.maintainers; [
AndersonTorres
yanganto
_0x4A6F
];
};
};
in in
buildRustPackage' { self
inherit pname version src cargoPatches cargoHash;
nativeBuildInputs = [
gobject-introspection
pkg-config
wrapGAppsHook4
];
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk4
pango
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
Foundation
AppKit
]);
nativeCheckInputs = [
xvfb-run
];
strictDeps = true;
checkPhase = ''
runHook preCheck
xvfb-run cargo test
runHook postCheck
'';
doCheck = stdenv.hostPlatform.isLinux
&& (stdenv.hostPlatform == stdenv.buildPlatform);
passthru.tests.version = testers.testVersion {
package = czkawka;
command = "czkawka_cli --version";
};
# Desktop items, icons and metainfo are not installed automatically
postInstall = ''
install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg
install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
'';
meta = {
changelog = "https://github.com/qarmin/czkawka/raw/${version}/Changelog.md";
description = "Simple, fast and easy to use app to remove unnecessary files from your computer";
homepage = "https://github.com/qarmin/czkawka";
license = with lib.licenses; [ mit ];
mainProgram = "czkawka_gui";
maintainers = with lib.maintainers; [ AndersonTorres yanganto _0x4A6F ];
};
}

View File

@ -0,0 +1,33 @@
{
lib,
czkawka,
makeWrapper,
symlinkJoin,
# configurable options
extraPackages ? [ ],
}:
symlinkJoin {
name = "czkawka-wrapped-${czkawka.version}";
inherit (czkawka) pname version outputs;
nativeBuildInputs = [ makeWrapper ];
paths = [ czkawka ];
postBuild = ''
${lib.concatMapStringsSep "\n" (
output: "ln --symbolic --no-target-directory ${czkawka.${output}} \$${output}"
) (lib.remove "out" czkawka.outputs)}
pushd $out/bin
for f in *; do
rm -v $f
makeWrapper ${lib.getBin czkawka}/bin/$f $out/bin/$f \
--prefix PATH ":" "${lib.makeBinPath extraPackages}"
done
popd
'';
meta = czkawka.meta;
}

View File

@ -8,16 +8,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "dezoomify-rs"; pname = "dezoomify-rs";
version = "2.12.4"; version = "2.12.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lovasoa"; owner = "lovasoa";
repo = "dezoomify-rs"; repo = "dezoomify-rs";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-7CRwlnIItJ89qqemkJbx5QjcLrwYrvpcjVYX5ZWP0W4="; hash = "sha256-PbtsrvNHo/SvToQJTTAPLoNDFotDPmSjr6C3IJZUjqU=";
}; };
cargoHash = "sha256-v48eM43+/dt2M1J9yfjfTpBetv6AA2Hhzu8rrL3gojg="; cargoHash = "sha256-K9LNommagWjVxOXq6YUE4eg/3zpj3+MR5BugGCcVUlA=";
buildInputs = lib.optionals stdenv.isDarwin ( buildInputs = lib.optionals stdenv.isDarwin (
with darwin.apple_sdk.frameworks; with darwin.apple_sdk.frameworks;

View File

@ -9,13 +9,13 @@
buildGoModule rec { buildGoModule rec {
pname = "doppler"; pname = "doppler";
version = "3.69.0"; version = "3.69.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dopplerhq"; owner = "dopplerhq";
repo = "cli"; repo = "cli";
rev = version; rev = version;
sha256 = "sha256-lijVKNmqTcmjgIzlcMdm/DUrBA+0xV6Wge9dt5xdWFY="; sha256 = "sha256-KiSRMF4S+gz8cnRxkO2SVwO3Rl6ImflK/4MEgkQh2UE=";
}; };
vendorHash = "sha256-NUHWKPszQH/pvnA+j65+bJ6t+C0FDRRbTviqkYztpE4="; vendorHash = "sha256-NUHWKPszQH/pvnA+j65+bJ6t+C0FDRRbTviqkYztpE4=";

View File

@ -167,7 +167,7 @@ stdenv'.mkDerivation (finalAttrs: {
}; };
meta = { meta = {
description = "Like neofetch, but much faster because written in C"; description = "An actively maintained, feature-rich and performance oriented, neofetch like system information tool";
homepage = "https://github.com/fastfetch-cli/fastfetch"; homepage = "https://github.com/fastfetch-cli/fastfetch";
changelog = "https://github.com/fastfetch-cli/fastfetch/releases/tag/${finalAttrs.version}"; changelog = "https://github.com/fastfetch-cli/fastfetch/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit; license = lib.licenses.mit;

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "gemmi"; pname = "gemmi";
version = "0.6.6"; version = "0.6.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "project-gemmi"; owner = "project-gemmi";
repo = "gemmi"; repo = "gemmi";
rev = "refs/tags/v${finalAttrs.version}"; rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-S31oCp6kLSYgmRaW7Q9/dMhjJ5Y0sK3WPpg2/ZMPyMg="; hash = "sha256-Y7gQSh9C7smoXuGWgpJI3hPIg06Jns+1dBpmMxuCrKE=";
}; };
nativeBuildInputs = nativeBuildInputs =

View File

@ -1,10 +0,0 @@
{ wrapCC, gcc49 }:
wrapCC (
gcc49.cc.override {
name = "gfortran";
langFortran = true;
langCC = false;
langC = false;
profiledCompiler = false;
}
)

View File

@ -6,6 +6,8 @@
libgit2, libgit2,
oniguruma, oniguruma,
zlib, zlib,
stdenv,
darwin,
nix-update-script, nix-update-script,
}: }:
@ -31,7 +33,7 @@ rustPlatform.buildRustPackage {
libgit2 libgit2
oniguruma oniguruma
zlib zlib
]; ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
env = { env = {
RUSTONIG_SYSTEM_LIBONIG = true; RUSTONIG_SYSTEM_LIBONIG = true;

View File

@ -8,16 +8,16 @@
buildGoModule rec { buildGoModule rec {
pname = "glance"; pname = "glance";
version = "0.5.1"; version = "0.6.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "glanceapp"; owner = "glanceapp";
repo = "glance"; repo = "glance";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-ebHSnzTRmWw2YBnVIR4h2zdZvbUHbKVzmQYPHDTvZDQ="; hash = "sha256-0P1f7IDEPSlVHtrygIsD502lIHqLISsSAi9pqB/gFdA=";
}; };
vendorHash = "sha256-Okme73vLc3Pe9+rNlmG8Bj1msKaVb5PaIBsAAeTer6s="; vendorHash = "sha256-BLWaYiWcLX+/DW7Zzp6/Mtw5uVxIVtfubB895hrZ+08=";
excludedPackages = [ "scripts/build-and-ship" ]; excludedPackages = [ "scripts/build-and-ship" ];

View File

@ -27,11 +27,11 @@ let
in in
stdenv'.mkDerivation (finalAttrs: { stdenv'.mkDerivation (finalAttrs: {
pname = "got"; pname = "got";
version = "0.102"; version = "0.103";
src = fetchurl { src = fetchurl {
url = "https://gameoftrees.org/releases/portable/got-portable-${finalAttrs.version}.tar.gz"; url = "https://gameoftrees.org/releases/portable/got-portable-${finalAttrs.version}.tar.gz";
hash = "sha256-qstQ6mZLCdYL5uQauMt7nGlEdPkPneGfu36RbaboN3c="; hash = "sha256-MkBek/NTpU+rylSS5abFQl8Vm3phRFCQkpnI3INJKHg=";
}; };
nativeBuildInputs = [ pkg-config bison ] nativeBuildInputs = [ pkg-config bison ]

View File

@ -8,13 +8,13 @@
buildGoModule rec { buildGoModule rec {
pname = "gowall"; pname = "gowall";
version = "0.1.7"; version = "0.1.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Achno"; owner = "Achno";
repo = "gowall"; repo = "gowall";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-R7dOONfyzj6V3101Rp/WhUcFpqrSKWEkVm4a2riXZAI="; hash = "sha256-r2IvwpvtWMlIKG0TNM4cLUPKFRgUV8E06VzkPSVCorI=";
}; };
vendorHash = "sha256-H2Io1K2LEFmEPJYVcEaVAK2ieBrkV6u+uX82XOvNXj4="; vendorHash = "sha256-H2Io1K2LEFmEPJYVcEaVAK2ieBrkV6u+uX82XOvNXj4=";

View File

@ -14,6 +14,7 @@
, libtool , libtool
, libwebp , libwebp
, libxml2 , libxml2
, libheifSupport ? true, libheif
, nukeReferences , nukeReferences
, pkg-config , pkg-config
, quantumdepth ? 8 , quantumdepth ? 8
@ -47,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
libwebp libwebp
libxml2 libxml2
zlib zlib
]; ] ++ lib.optionals libheifSupport [ libheif ];
nativeBuildInputs = [ nativeBuildInputs = [
nukeReferences nukeReferences

View File

@ -1,28 +1,29 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, makeWrapper fetchFromGitHub,
, makeDesktopItem makeWrapper,
, copyDesktopItems makeDesktopItem,
, SDL2 copyDesktopItems,
, bzip2 SDL2,
, cmake bzip2,
, fluidsynth cmake,
, game-music-emu fluidsynth,
, gtk3 game-music-emu,
, imagemagick gtk3,
, libGL imagemagick,
, libjpeg libGL,
, libsndfile libjpeg,
, libvpx libsndfile,
, libwebp libvpx,
, mpg123 libwebp,
, ninja mpg123,
, openal ninja,
, pkg-config openal,
, vulkan-loader pkg-config,
, zlib vulkan-loader,
, zmusic zlib,
zmusic,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -37,7 +38,10 @@ stdenv.mkDerivation rec {
hash = "sha256-taie1Iod3pXvuxxBC7AArmtndkIV0Di9mtJoPvPkioo="; hash = "sha256-taie1Iod3pXvuxxBC7AArmtndkIV0Di9mtJoPvPkioo=";
}; };
outputs = [ "out" "doc" ]; outputs = [
"out"
"doc"
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
@ -68,9 +72,10 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
substituteInPlace tools/updaterevision/UpdateRevision.cmake \ substituteInPlace tools/updaterevision/UpdateRevision.cmake \
--replace "ret_var(Tag)" "ret_var(\"${src.rev}\")" \ --replace-fail "ret_var(Tag)" "ret_var(\"${src.rev}\")" \
--replace "ret_var(Timestamp)" "ret_var(\"1970-00-00 00:00:00 +0000\")" \ --replace-fail "ret_var(Timestamp)" "ret_var(\"1970-00-00 00:00:00 +0000\")" \
--replace "ret_var(Hash)" "ret_var(\"${src.rev}\")" --replace-fail "ret_var(Hash)" "ret_var(\"${src.rev}\")" \
--replace-fail "<unknown version>" "${src.rev}"
''; '';
cmakeFlags = [ cmakeFlags = [
@ -91,16 +96,17 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
mv $out/bin/gzdoom $out/share/games/doom/gzdoom mv $out/bin/gzdoom $out/share/games/doom/gzdoom
makeWrapper $out/share/games/doom/gzdoom $out/bin/gzdoom makeWrapper $out/share/games/doom/gzdoom $out/bin/gzdoom \
--set LD_LIBRARY_PATH ${lib.makeLibraryPath [ vulkan-loader ]}
for size in 16 24 32 48 64 128; do for size in 16 24 32 48 64 128; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert -background none -resize "$size"x"$size" $src/src/win32/icon1.ico -flatten \ magick $src/src/win32/icon1.ico -background none -resize "$size"x"$size" -flatten \
$out/share/icons/hicolor/"$size"x"$size"/apps/gzdoom.png $out/share/icons/hicolor/"$size"x"$size"/apps/gzdoom.png
done; done;
''; '';
meta = with lib; { meta = {
homepage = "https://github.com/ZDoom/gzdoom"; homepage = "https://github.com/ZDoom/gzdoom";
description = "Modder-friendly OpenGL and Vulkan source port based on the DOOM engine"; description = "Modder-friendly OpenGL and Vulkan source port based on the DOOM engine";
mainProgram = "gzdoom"; mainProgram = "gzdoom";
@ -108,8 +114,12 @@ stdenv.mkDerivation rec {
GZDoom is a feature centric port for all DOOM engine games, based on GZDoom is a feature centric port for all DOOM engine games, based on
ZDoom, adding an OpenGL renderer and powerful scripting capabilities. ZDoom, adding an OpenGL renderer and powerful scripting capabilities.
''; '';
license = licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = platforms.linux; platforms = lib.platforms.linux;
maintainers = with maintainers; [ azahi lassulus ]; maintainers = with lib.maintainers; [
azahi
lassulus
Gliczy
];
}; };
} }

View File

@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitea,
rustPlatform,
meson,
ninja,
pkg-config,
cargo,
rustc,
blueprint-compiler,
wrapGAppsHook4,
desktop-file-utils,
libadwaita,
libshumate,
alsa-lib,
espeak,
sqlite,
glib-networking,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "jogger";
version = "1.2.4-unstable-2024-04-05";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "baarkerlounger";
repo = "jogger";
rev = "09386b9503a9b996b86ea4638268403868b24d6a";
hash = "sha256-oGjqYRHkYk22/RzDc5c0066SlOPGRGC6z/BTn1DM03o=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) pname version src;
hash = "sha256-+8mMJgLHLUdFLOwjhXolHcVUP+s/j6PlWeRh8sGRYTc=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.bindgenHook
cargo
rustc
blueprint-compiler
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libadwaita
libshumate
alsa-lib
espeak
sqlite
glib-networking
];
meta = {
description = "App for Gnome Mobile to Track running and other workouts";
homepage = "https://codeberg.org/baarkerlounger/jogger";
license = with lib.licenses; [
gpl3Plus
cc0
];
mainProgram = "jogger";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})

View File

@ -19,19 +19,26 @@
, udev , udev
, wayland , wayland
, xorgproto , xorgproto
, nix-update-script
}: }:
stdenv.mkDerivation (self: { stdenv.mkDerivation (finalAttrs: {
pname = "louvre"; pname = "louvre";
version = "2.2.0-1"; version = "2.9.0-1";
rev = "v${self.version}";
hash = "sha256-Ds1TTxHFq0Z88djdpAunhtKAipOCTodKIKOh5oxF568=";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit (self) rev hash;
owner = "CuarzoSoftware"; owner = "CuarzoSoftware";
repo = "Louvre"; repo = "Louvre";
rev = "v${finalAttrs.version}";
hash = "sha256-0M1Hl5kF8r4iFflkGBb9CWqwzauSZPVKSRNWZKFZC4U=";
}; };
sourceRoot = "${finalAttrs.src.name}/src";
postPatch = ''
substituteInPlace examples/meson.build \
--replace-fail "/usr/local/share/wayland-sessions" "${placeholder "out"}/share/wayland-sessions"
'';
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja
@ -58,10 +65,9 @@ stdenv.mkDerivation (self: {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
preConfigure = '' passthru = {
# The root meson.build file is in src/ updateScript = nix-update-script { };
cd src };
'';
meta = { meta = {
description = "C++ library for building Wayland compositors"; description = "C++ library for building Wayland compositors";

View File

@ -30,4 +30,4 @@ stdenv.mkDerivation (finalAttrs: {
platforms = lib.platforms.all; platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ ehmry ]; maintainers = with lib.maintainers; [ ehmry ];
}; };
}) })

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "marwaita-teal"; pname = "marwaita-teal";
version = "20.3.1"; version = "21";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "darkomarko42"; owner = "darkomarko42";
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-0OKG7JOpPiYbofiHWtLfkqHsZZIeGJPhl/tW1CIO3co="; hash = "sha256-9WH/mbnLLLAf8B5Fwd7PMRAX2psWVJn7gGO4C5KkLjM=";
}; };
buildInputs = [ buildInputs = [

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
] ]
++ [ ++ [
"LSCOTCHDIR=${scotch}/lib" "LSCOTCHDIR=${scotch}/lib"
"ISCOTCH=-I${scotch}/include" "ISCOTCH=-I${scotch.dev}/include"
"LMETISDIR=${metis}/lib" "LMETISDIR=${metis}/lib"
"IMETIS=-I${metis}/include" "IMETIS=-I${metis}/include"
"allshared" "allshared"

View File

@ -0,0 +1,56 @@
{
lib,
flutter324,
fetchFromGitHub,
mpv-unwrapped,
libass,
pulseaudio,
}:
flutter324.buildFlutterApplication rec {
pname = "musicpod";
version = "1.11.0";
src = fetchFromGitHub {
owner = "ubuntu-flutter-community";
repo = "musicpod";
rev = "v${version}";
hash = "sha256-Xs6qDSqd10mYjLNFiPV9Irthd/hK2kE4fC6i03QvOn0=";
};
postPatch = ''
substituteInPlace snap/gui/musicpod.desktop \
--replace-fail 'Icon=''${SNAP}/meta/gui/musicpod.png' 'Icon=musicpod'
'';
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
audio_service_mpris = "sha256-QRZ4a3w4MZP8/A4yXzP4P9FPwEVNXlntmBwE8I+s2Kk=";
media_kit_native_event_loop = "sha256-JBtFTYlztDQvN/qQcDxkK27mka2fSG+iiIIxk2mqEpY=";
media_kit_video = "sha256-JBtFTYlztDQvN/qQcDxkK27mka2fSG+iiIIxk2mqEpY=";
phoenix_theme = "sha256-5kgPAnK61vFi/sJ1jr3c5D2UZbxItW8YOk/IJEtHkZo=";
yaru = "sha256-3GexoQpwr7pazajAMyPl9rcYhmSgQeialZTvJsadP4k=";
};
buildInputs = [
mpv-unwrapped
libass
];
runtimeDependencies = [ pulseaudio ];
postInstall = ''
install -Dm644 snap/gui/musicpod.desktop -t $out/share/applications
install -Dm644 snap/gui/musicpod.png -t $out/share/pixmaps
'';
meta = {
description = "Music, radio, television and podcast player";
homepage = "https://github.com/ubuntu-flutter-community/musicpod";
license = lib.licenses.gpl3Only;
mainProgram = "musicpod";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
}

File diff suppressed because it is too large Load Diff

View File

@ -9,16 +9,16 @@
buildGoModule rec { buildGoModule rec {
pname = "myks"; pname = "myks";
version = "4.2.2"; version = "4.2.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mykso"; owner = "mykso";
repo = "myks"; repo = "myks";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-jI5u/xaAt7BOug/okrrRoZXZVJOr+ahGtFJE3PbPQ7k="; hash = "sha256-sf+X+qafR0kpJTNIYoLr8q6stm+DgiD/yhVRyBRPA/s=";
}; };
vendorHash = "sha256-Ka+zVKQBAd6ChOYOw4FYzqJCfdzpN2OppDJsoT/5I0c="; vendorHash = "sha256-aWXU2UG4/U8g4dgspjyIfTT2J++WoJlLHAo6K3CSLxc=";
subPackages = "."; subPackages = ".";

View File

@ -7,16 +7,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "nickel"; pname = "nickel";
version = "1.7.0"; version = "1.8.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tweag"; owner = "tweag";
repo = "nickel"; repo = "nickel";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-EwiZg0iyF9EQ0Z65Re5WgeV7xgs/wPtTQ9XA0iEMEIQ="; hash = "sha256-mjmT1ogvUJgy3Jb6m/npE+1if1Uy191wPU80nNlVwdM=";
}; };
cargoHash = "sha256-JwuBjCWETIlBX5xswdznOAmzkL0Rn6cv7pxM6DwAkOs="; cargoHash = "sha256-XDDvuIVWvmsO09aQLF28OyH5n+9aO5J+89EQLru7Jrc=";
cargoBuildFlags = [ "-p nickel-lang-cli" "-p nickel-lang-lsp" ]; cargoBuildFlags = [ "-p nickel-lang-cli" "-p nickel-lang-lsp" ];

View File

@ -13,7 +13,7 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "nix-weather"; pname = "nix-weather";
version = "0.0.3"; version = "0.0.4";
# fetch from GitHub and not upstream forgejo because cafkafk doesn't want to # fetch from GitHub and not upstream forgejo because cafkafk doesn't want to
# pay for bandwidth # pay for bandwidth
@ -21,10 +21,10 @@ rustPlatform.buildRustPackage rec {
owner = "cafkafk"; owner = "cafkafk";
repo = "nix-weather"; repo = "nix-weather";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-deVgDYYIv5SyKrkPAfPgbmQ/n4hYSrK2dohaiR5O0QE="; hash = "sha256-15FUA4fszbAVXop3IyOHfxroyTt9/SkWZsSTUh9RtwY=";
}; };
cargoHash = "sha256-QJybGxqOJid1D6FTy7lvrakkB/Ss3P3JnXtU1UlGlW0="; cargoHash = "sha256-vMeljXNWfFRyeQ4ZQ/Qe1vcW5bg5Y14aEH5HgEwOX3Q=";
cargoExtraArgs = "-p nix-weather"; cargoExtraArgs = "-p nix-weather";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];

View File

@ -2,7 +2,6 @@
lib, lib,
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
buildEnv, buildEnv,
linkFarm, linkFarm,
overrideCC, overrideCC,
@ -52,28 +51,6 @@ let
vendorHash = "sha256-hSxcREAujhvzHVNwnRTfhi0MKI3s8HNavER2VLz6SYk="; vendorHash = "sha256-hSxcREAujhvzHVNwnRTfhi0MKI3s8HNavER2VLz6SYk=";
# ollama's patches of llama.cpp's example server
# `ollama/llm/generate/gen_common.sh` -> "apply temporary patches until fix is upstream"
# each update, these patches should be synchronized with the contents of `ollama/llm/patches/`
llamacppPatches = [
(preparePatch "01-load-progress.diff" "sha256-UTmnBS5hQjIL3eXDZc8RBDNJunLlkqJWH20LpXNiGRQ=")
(preparePatch "02-clip-log.diff" "sha256-rMWbl3QgrPlhisTeHwD7EnGRJyOhLB4UeS7rqa0tdXM=")
(preparePatch "03-load_exception.diff" "sha256-NJkT/k8Mf8HcEMb0XkaLmyUNKV3T+384JRPnmwDI/sk=")
(preparePatch "04-metal.diff" "sha256-bPBCfoT3EjZPjWKfCzh0pnCUbM/fGTj37yOaQr+QxQ4=")
(preparePatch "05-default-pretokenizer.diff" "sha256-mxqHnDbiy8yfKFUYryNTj/xay/lx9KDiZAiekFSkxr8=")
(preparePatch "06-embeddings.diff" "sha256-+4yAEAX1JJenOksG2OxDCwiLEoLj1glJQLIgV08BI5Q=")
(preparePatch "07-clip-unicode.diff" "sha256-1qMJoXhDewxsqPbmi+/7xILQfGaybZDyXc5eH0winL8=")
];
preparePatch =
patch: hash:
fetchpatch {
url = "file://${src}/llm/patches/${patch}";
inherit hash;
stripLen = 1;
extraPrefix = "llm/llama.cpp/";
};
validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) (lib.concatStrings [ validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) (lib.concatStrings [
"both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, " "both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, "
"but they are mutually exclusive; falling back to cpu" "but they are mutually exclusive; falling back to cpu"
@ -174,13 +151,25 @@ goBuild (
# disable uses of `git` in the `go generate` script # disable uses of `git` in the `go generate` script
# ollama's build script assumes the source is a git repo, but nix removes the git directory # ollama's build script assumes the source is a git repo, but nix removes the git directory
# this also disables necessary patches contained in `ollama/llm/patches/` # this also disables necessary patches contained in `ollama/llm/patches/`
# those patches are added to `llamacppPatches`, and reapplied here in the patch phase # those patches are applied in `postPatch`
./disable-git.patch ./disable-git.patch
] ++ llamacppPatches; ];
postPatch = '' postPatch = ''
# replace inaccurate version number with actual release version # replace inaccurate version number with actual release version
substituteInPlace version/version.go --replace-fail 0.0.0 '${version}' substituteInPlace version/version.go --replace-fail 0.0.0 '${version}'
# apply llama.cpp patches
for cur in llm/patches/*; do patch -p1 -d llm/llama.cpp < $cur; done
''; '';
overrideModAttrs = (
finalAttrs: prevAttrs: {
# don't run llama.cpp build in the module fetch phase
preBuild = "";
}
);
preBuild = '' preBuild = ''
# disable uses of `git`, since nix removes the git directory # disable uses of `git`, since nix removes the git directory
export OLLAMA_SKIP_PATCHING=true export OLLAMA_SKIP_PATCHING=true

View File

@ -6,18 +6,18 @@
buildGoModule rec { buildGoModule rec {
pname = "pulumi-esc"; pname = "pulumi-esc";
version = "0.9.1"; version = "0.10.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pulumi"; owner = "pulumi";
repo = "esc"; repo = "esc";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-9K7pP4MOShHPTxTuKaUMY87Z4rDkGHrV9Ds1guUpFqM="; hash = "sha256-SeHO8N8NwAF4f6Eo46V2mBElVgJc5ijVrjsBHWtUMc0=";
}; };
subPackages = "cmd/esc"; subPackages = "cmd/esc";
vendorHash = "sha256-uVw8jc7dZOHdJt9uVDJGaJWkD7dz0rQ3W1pJXSrcW5w="; vendorHash = "sha256-xJtlTyhGyoxefE2pFcLGHMapn9L2F/PKuNt49J41viE=";
ldflags = [ ldflags = [
"-s" "-s"

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ZDoom"; owner = "ZDoom";
repo = "Raze"; repo = "Raze";
rev = finalAttrs.version; rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-R3Sm/cibg+D2QPS4UisRp91xvz3Ine2BUR8jF5Rbj1g="; hash = "sha256-R3Sm/cibg+D2QPS4UisRp91xvz3Ine2BUR8jF5Rbj1g=";
leaveDotGit = true; leaveDotGit = true;
postFetch = '' postFetch = ''
@ -68,7 +68,8 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = '' postInstall = ''
mv $out/bin/raze $out/share/raze mv $out/bin/raze $out/share/raze
makeWrapper $out/share/raze/raze $out/bin/raze makeWrapper $out/share/raze/raze $out/bin/raze \
--set LD_LIBRARY_PATH ${lib.makeLibraryPath [ vulkan-loader ]}
install -Dm644 ../source/platform/posix/org.zdoom.Raze.256.png $out/share/pixmaps/org.zdoom.Raze.png install -Dm644 ../source/platform/posix/org.zdoom.Raze.256.png $out/share/pixmaps/org.zdoom.Raze.png
install -Dm644 ../source/platform/posix/org.zdoom.Raze.desktop $out/share/applications/org.zdoom.Raze.desktop install -Dm644 ../source/platform/posix/org.zdoom.Raze.desktop $out/share/applications/org.zdoom.Raze.desktop
install -Dm644 ../soundfont/raze.sf2 $out/share/raze/soundfonts/raze.sf2 install -Dm644 ../soundfont/raze.sf2 $out/share/raze/soundfonts/raze.sf2

View File

@ -14,16 +14,24 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "scotch"; pname = "scotch";
version = "7.0.4"; version = "7.0.5";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "gitlab.inria.fr"; domain = "gitlab.inria.fr";
owner = "scotch"; owner = "scotch";
repo = "scotch"; repo = "scotch";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-uaox4Q9pTF1r2BZjvnU2LE6XkZw3x9mGSKLdRVUobGU="; hash = "sha256-XXkVwTr8cbYfzXWWkPERTmjfE86JHUUuU6yxjp9k6II=";
}; };
outputs = [
"bin"
"dev"
"out"
];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
gfortran gfortran

View File

@ -6,7 +6,7 @@
, makeWrapper , makeWrapper
}: }:
let let
version = "1.0.4"; version = "2.2.0";
in in
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
pname = "sink-rotate"; pname = "sink-rotate";
@ -16,10 +16,10 @@ rustPlatform.buildRustPackage {
owner = "mightyiam"; owner = "mightyiam";
repo = "sink-rotate"; repo = "sink-rotate";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-q20uUr+7yLJlZc5YgEkY125YrZ2cuJrPv5IgWXaYRlo="; hash = "sha256-ZHbisG9pdctkwfD1S3kxMZhBqPw0Ni5Q9qQG4RssnSw=";
}; };
cargoHash = "sha256-MPeyPTkxpi6iw/BT5m4S7jVBD0c2zG2rsv+UZWQxpUU="; cargoHash = "sha256-TWuyU1+F3zEcFFd8ZeZmL3IvpKLLv3zimZ2WFVYFqyo=";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -30,7 +30,7 @@ rustPlatform.buildRustPackage {
''; '';
meta = with lib; { meta = with lib; {
description = "Command that rotates default between two PipeWire audio sinks"; description = "Command that rotates the default PipeWire audio sink";
homepage = "https://github.com/mightyiam/sink-rotate"; homepage = "https://github.com/mightyiam/sink-rotate";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ mightyiam ]; maintainers = with maintainers; [ mightyiam ];

View File

@ -30,11 +30,10 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ autoconf automake itstool intltool gettext buildInputs = [ autoconf automake itstool intltool gettext
mono mono
stfl stfl ] ++ lib.optionals (guiSupport) [
makeWrapper ] ++ lib.optionals (guiSupport) [
gtk-sharp-2_0 gtk-sharp-2_0
# loaded at runtime by GTK# # loaded at runtime by GTK#
gdk-pixbuf pango gdk-pixbuf pango

View File

@ -16,20 +16,16 @@ let
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "surrealdb"; pname = "surrealdb";
version = "1.5.4"; version = "1.5.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "surrealdb"; owner = "surrealdb";
repo = "surrealdb"; repo = "surrealdb";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-KtR+qU2Xys4NkEARZBbO8mTPa7EI9JplWvXdtuLt2vE="; hash = "sha256-C2ppLbNv68qpl2bcqWp/PszcCeGCsD0LbEdAM9P1asg=";
}; };
cargoPatches = [ cargoHash = "sha256-gLepa9JxY9AYyGepV6Uzt1g7apkKWJxf0SiNCSkjUDg=";
./time.patch # TODO: remove when https://github.com/surrealdb/surrealdb/pull/4565 merged
];
cargoHash = "sha256-5qIIPdE6HYov5EIR4do+pMeZ1Lo3at39aKOP9scfMy8=";
# error: linker `aarch64-linux-gnu-gcc` not found # error: linker `aarch64-linux-gnu-gcc` not found
postPatch = '' postPatch = ''

View File

@ -1,28 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index 64b3955f..b4598827 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6478,9 +6478,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.34"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
@@ -6499,9 +6499,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.17"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",

View File

@ -1,5 +1,5 @@
{ lib { lib
, buildGoModule , buildGo123Module
, fetchFromGitHub , fetchFromGitHub
, nixosTests , nixosTests
, stdenv , stdenv
@ -7,9 +7,9 @@
, telegraf , telegraf
}: }:
buildGoModule rec { buildGo123Module rec {
pname = "telegraf"; pname = "telegraf";
version = "1.31.3"; version = "1.32.0";
subPackages = [ "cmd/telegraf" ]; subPackages = [ "cmd/telegraf" ];
@ -17,10 +17,10 @@ buildGoModule rec {
owner = "influxdata"; owner = "influxdata";
repo = "telegraf"; repo = "telegraf";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-J5jIyrxG2cLEu909/fcPQCo+xUlW6VAoge5atCrW4HY="; hash = "sha256-ITTlHsoWPXHbGtmNOE0x1sCbeADWi4liOEqXXKQUeGU=";
}; };
vendorHash = "sha256-lxLFUKOFg7HAjgZIVACW6VlWLgCeZX38SNRsjxc9D7g="; vendorHash = "sha256-wKl6Rutt2QrF4nLxB5Ic6QlekrPUfHwdFZyTTdbK0HU=";
proxyVendor = true; proxyVendor = true;
ldflags = [ ldflags = [

View File

@ -4,7 +4,7 @@
}: }:
let let
pname = "wait4x"; pname = "wait4x";
version = "2.14.1"; version = "2.14.2";
in in
buildGoModule { buildGoModule {
inherit pname version; inherit pname version;
@ -13,10 +13,10 @@ buildGoModule {
owner = "atkrad"; owner = "atkrad";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-7dm1KERBYkASuRWlCbpbLuHVc4uCMPWbSwegjZ8LwVU="; hash = "sha256-fNPZ/qgAn4odd5iWnDK1RWPxeBhS/l4ffHLFB27SAoM=";
}; };
vendorHash = "sha256-CYE5wvBgNLYzCiibd9SWubIQ+22nffr4jpwgwSxhtGo="; vendorHash = "sha256-Eio6CoYaChG59rHL4tfl7dNWliD7ksRyhoCPxMvMmrQ=";
# Tests make network access # Tests make network access
doCheck = false; doCheck = false;

View File

@ -0,0 +1,44 @@
// taken from https://aur.archlinux.org/cgit/aur.git/tree/libuosdevicea.c?h=wechat-universal
/*
* licensestub - compat layer for libuosdevicea
* Copyright (C) 2024 Zephyr Lykos <self@mochaa.ws>
* Copyright (C) 2024 Guoxin "7Ji" Pu <pugokushin@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#define _GNU_SOURCE
#include <string.h>
#define declare_string_getter(suffix, constant) void uos_get_##suffix(char *const restrict out) { if (out) strcpy(out, constant); }
declare_string_getter(mac, // MAC address with colon stripped
"000000000000")
declare_string_getter(hddsninfo,
"SN")
declare_string_getter(hwserial, // MD5 of hddsninfo
"92666505ce75444ee14be2ebc2f10a60")
declare_string_getter(mb_sn, // hardcoded
"E50022008800015957007202c59a1a8-3981-2020-0810-204909000000")
declare_string_getter(osver,
"UnionTech OS Desktop")
declare_string_getter(licensetoken,
"djEsdjEsMSwyLDk5QUFFN0FBQVdRQjk5OFhKS0FIU1QyOTQsMTAsOTI2NjY1MDVjZTc1NDQ0ZWUxNGJlMmViYzJmMTBhNjAsQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUE6ZjA3NjAwYzZkNmMyMDkyMDBkMzE5YzU2OThmNTc3MGRlYWY1NjAyZTY5MzUxZTczNjI2NjlhNzIyZTBkNTJiOTNhYzk0MmM3YTNkZTgxNjIxMmUwMDA1NTUwODg4N2NlMDQ4ODMyNTExY2JhNGFiMjdmYzlmZjMyYzFiNTYwNjMwZDI3ZDI2NmE5ZGIxZDQ0N2QxYjNlNTNlNTVlOTY1MmU5YTU4OGY0NWYzMTMwZDE0NDc4MTRhM2FmZjRlZGNmYmNkZjhjMmFiMDc5OWYwNGVmYmQ2NjdiNGYwYzEwNDhkYzExNjYwZWU1NTdlNTdmNzBlNjA1N2I0NThkMDgyOA==")
int uos_is_active() {
return 0;
}

View File

@ -19,7 +19,6 @@
, mesa , mesa
, alsa-lib , alsa-lib
, wayland , wayland
, openssl_1_1
, atk , atk
, qt6 , qt6
, at-spi2-atk , at-spi2-atk
@ -112,6 +111,40 @@ let
outputHash = "sha256-pNftwtUZqBsKBSPQsEWlYLlb6h2Xd9j56ZRMi8I82ME="; outputHash = "sha256-pNftwtUZqBsKBSPQsEWlYLlb6h2Xd9j56ZRMi8I82ME=";
}; };
libuosdevicea = stdenv.mkDerivation rec {
name = "libuosdevicea";
src = ./libuosdevicea.c;
unpackPhase = ''
runHook preUnpack
cp ${src} libuosdevicea.c
runHook postUnpack
'';
buildPhase = ''
runHook preBuild
$CC -shared -fPIC -o libuosdevicea.so libuosdevicea.c
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp libuosdevicea.so $out/lib/
runHook postInstall
'';
meta = with lib; {
license = licenses.gpl2Plus;
};
};
wechat-uos-runtime = with xorg; [ wechat-uos-runtime = with xorg; [
# Make sure our glibc without hardening gets picked up first # Make sure our glibc without hardening gets picked up first
(lib.hiPrio glibcWithoutHardening) (lib.hiPrio glibcWithoutHardening)
@ -173,7 +206,6 @@ let
wayland wayland
pulseaudio pulseaudio
qt6.qt5compat qt6.qt5compat
openssl_1_1
bzip2 bzip2
]; ];
@ -199,22 +231,6 @@ let
}; };
}.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported."); }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
# Don't blame about this. WeChat requires some binary from here to work properly
uosSrc = {
x86_64-linux = fetchurl {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_amd64.deb";
hash = "sha256-vVN7w+oPXNTMJ/g1Rpw/AVLIytMXI+gLieNuddyyIYE=";
};
aarch64-linux = fetchurl {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_arm64.deb";
hash = "sha256-XvGFPYJlsYPqRyDycrBGzQdXn/5Da1AJP5LgRVY1pzI=";
};
loongarch64-linux = fetchurl {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_loongarch64.deb";
hash = "sha256-oa6rLE6QXMCPlbebto9Tv7xT3fFqYIlXL6WHpB2U35s=";
};
}.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
inherit uosLicense; inherit uosLicense;
nativeBuildInputs = [ dpkg ]; nativeBuildInputs = [ dpkg ];
@ -223,7 +239,6 @@ let
runHook preUnpack runHook preUnpack
dpkg -x $src ./wechat-uos dpkg -x $src ./wechat-uos
dpkg -x $uosSrc ./wechat-uos-old-source
runHook postUnpack runHook postUnpack
''; '';
@ -237,7 +252,7 @@ let
mkdir -pv $out/usr/lib/wechat-uos/license mkdir -pv $out/usr/lib/wechat-uos/license
ln -s ${uosLicenseUnzipped}/* $out/usr/lib/wechat-uos/license/ ln -s ${uosLicenseUnzipped}/* $out/usr/lib/wechat-uos/license/
cp -r wechat-uos-old-source/usr/lib/license/libuosdevicea.so $out/usr/lib/wechat-uos/license/ ln -s ${libuosdevicea}/lib/libuosdevicea.so $out/usr/lib/wechat-uos/license/
runHook postInstall runHook postInstall
''; '';

View File

@ -2,19 +2,21 @@
, buildGoModule , buildGoModule
, fetchFromGitHub , fetchFromGitHub
, git , git
, nix-update-script
}: }:
buildGoModule { buildGoModule {
pname = "zoekt"; pname = "zoekt";
version = "unstable-2022-11-09"; version = "0-unstable-2024-09-05";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sourcegraph"; owner = "sourcegraph";
repo = "zoekt"; repo = "zoekt";
rev = "c4b18d3b44da94b3e7c9c94467d68c029666bb86"; rev = "35dda3e212b7d7fb0df43dcbd88eb7a7b49ad9d8";
hash = "sha256-QtwOiBxBeFkhRfH3R2fP72b05Hc4+zt9njqCNVcprZ4="; hash = "sha256-YdInCAq7h7iC1sfMekLgxqu3plUHr5Ku6FxyPKluQzw=";
}; };
vendorHash = "sha256-DiAqFJ8E5V0/eHztm92WVrf1XGPXmmOaVXaWHfQMn2k="; vendorHash = "sha256-GPeMRL5zWVjJVYpFPnB211Gfm/IaqisP1s6RNaLvN6M=";
nativeCheckInputs = [ nativeCheckInputs = [
git git
@ -25,6 +27,10 @@ buildGoModule {
git config --global --replace-all protocol.file.allow always git config --global --replace-all protocol.file.allow always
''; '';
passthru.updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
};
meta = { meta = {
description = "Fast trigram based code search"; description = "Fast trigram based code search";
homepage = "https://github.com/sourcegraph/zoekt"; homepage = "https://github.com/sourcegraph/zoekt";

View File

@ -31,7 +31,6 @@ in stdenv.mkDerivation rec {
homepage = "https://github.com/ful1e5/apple_cursor"; homepage = "https://github.com/ful1e5/apple_cursor";
license = [ license = [
licenses.gpl3Only licenses.gpl3Only
# Potentially a derivative work of copyrighted Apple designs # Potentially a derivative work of copyrighted Apple designs
licenses.unfree licenses.unfree
]; ];

View File

@ -9,4 +9,5 @@
sqlcipher_flutter_libs = callPackage ./sqlcipher_flutter_libs { }; sqlcipher_flutter_libs = callPackage ./sqlcipher_flutter_libs { };
sqlite3 = callPackage ./sqlite3 { }; sqlite3 = callPackage ./sqlite3 { };
system_tray = callPackage ./system-tray { }; system_tray = callPackage ./system-tray { };
super_native_extensions = callPackage ./super_native_extensions { };
} }

View File

@ -0,0 +1,77 @@
{
lib,
rustPlatform,
pkg-config,
at-spi2-atk,
gdk-pixbuf,
cairo,
gtk3,
writeText,
stdenv,
}:
{ version, src, ... }:
let
rustDep = rustPlatform.buildRustPackage {
pname = "super_native_extensions-rs";
inherit version src;
sourceRoot = "${src.name}/rust";
cargoLock =
rec {
_0_8_22 = {
lockFile = ./Cargo-0.8.22.lock;
outputHashes = {
"mime_guess-2.0.4" = "sha256-KSw0YUTGqNEWY9pMvQplUGajJgoP2BRwVX6qZPpB2rI=";
};
};
_0_8_21 = _0_8_22;
_0_8_20 = _0_8_22;
_0_8_19 = _0_8_22;
_0_8_18 = _0_8_22;
_0_8_17 = _0_8_22;
}
.${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
Unsupported version of pub 'super_native_extensions': '${version}'
Please add ${src}/rust/Cargo.lock
to this path, and add corresponding entry here. If the lock
is the same with existing versions, add an alias here.
'');
nativeBuildInputs = [ pkg-config ];
buildInputs = [
at-spi2-atk
gdk-pixbuf
cairo
gtk3
];
passthru.libraryPath = "lib/libsuper_native_extensions.so";
};
fakeCargokitCmake = writeText "FakeCargokit.cmake" ''
function(apply_cargokit target manifest_dir lib_name any_symbol_name)
target_link_libraries("''${target}" PRIVATE ${rustDep}/${rustDep.passthru.libraryPath})
set("''${target}_cargokit_lib" ${rustDep}/${rustDep.passthru.libraryPath} PARENT_SCOPE)
endfunction()
'';
in
stdenv.mkDerivation {
pname = "super_native_extensions";
inherit version src;
inherit (src) passthru;
installPhase = ''
runHook preInstall
cp -r "$src" "$out"
chmod +rwx $out/cargokit/cmake/cargokit.cmake
cp ${fakeCargokitCmake} $out/cargokit/cmake/cargokit.cmake
runHook postInstall
'';
}

View File

@ -1,24 +1,24 @@
let version = "3.5.1"; in let version = "3.5.2"; in
{ fetchurl }: { { fetchurl }: {
versionUsed = version; versionUsed = version;
"${version}-x86_64-darwin" = fetchurl { "${version}-x86_64-darwin" = fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip"; url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip";
sha256 = "18v73dr61033g0x27vb0fdjwyzc1d04fifmwwnv4157nfpb68ijc"; sha256 = "0k1h7kbcagm7s0n8696lzws814rabz3491khd7z78mb3ivahxw35";
}; };
"${version}-aarch64-darwin" = fetchurl { "${version}-aarch64-darwin" = fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip"; url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip";
sha256 = "1vjsnwlkvsb0xvap45fdd81vdsjkpl2yxr8xh39v77dxbpybi0qh"; sha256 = "036jw4qq3wicyfpamy7v6qsbrj0m7dyny45yzdgil4snvfagvfsv";
}; };
"${version}-aarch64-linux" = fetchurl { "${version}-aarch64-linux" = fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip"; url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip";
sha256 = "0lwnvky3p37d81ib6qwxra7lxn19l5x30c7aycixd9yaslq1bc0v"; sha256 = "1wm1157hbsms872pp1fkn0i3khz3h4r909bdvpk2rhag2l928f0a";
}; };
"${version}-x86_64-linux" = fetchurl { "${version}-x86_64-linux" = fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip"; url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip";
sha256 = "0zn2mw8awii0hrvyh146hb5604li0jgxxgavpi19zcdpnzdg6z7c"; sha256 = "160dk1dpdzdh0pphmvdw7agavpyxniw8zf5w30yamkdi7r9g0l0b";
}; };
"${version}-i686-linux" = fetchurl { "${version}-i686-linux" = fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-ia32-release.zip"; url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-ia32-release.zip";
sha256 = "11x7yyif51hyn8yi2lqbkfm3lfalkvh54v5pi851mfdnf14hsjpw"; sha256 = "0nrgjdzc2skqc2b52pzw78056jqrqmiwzwwd9wh699dwwfnrjcf4";
}; };
} }

View File

@ -56,7 +56,7 @@ let
(mkCustomFlutter args).overrideAttrs (prev: next: { (mkCustomFlutter args).overrideAttrs (prev: next: {
passthru = next.passthru // rec { passthru = next.passthru // rec {
inherit wrapFlutter mkCustomFlutter mkFlutter; inherit wrapFlutter mkCustomFlutter mkFlutter;
buildFlutterApplication = callPackage ../../../build-support/flutter { flutter = wrapFlutter (mkCustomFlutter args); }; buildFlutterApplication = callPackage ./build-support/build-flutter-application.nix { flutter = wrapFlutter (mkCustomFlutter args); };
}; };
}); });

View File

@ -29,11 +29,11 @@ let
else if atLeast "9" then isl_0_20 else if atLeast "9" then isl_0_20
else if atLeast "7" then isl_0_17 else if atLeast "7" then isl_0_17
else if atLeast "6" then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14) else if atLeast "6" then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14)
else /* "4.9" */ isl_0_11; else /* "5" */ isl_0_11;
} // lib.optionalAttrs (!(atLeast "6")) { } // lib.optionalAttrs (!(atLeast "6")) {
cloog = if stdenv.isDarwin cloog = if stdenv.isDarwin
then null then null
else /* 4.9 */ cloog_0_18_0; else /* 5 */ cloog_0_18_0;
} // lib.optionalAttrs (atLeast "6" && !(atLeast "9")) { } // lib.optionalAttrs (atLeast "6" && !(atLeast "9")) {
# gcc 10 is too strict to cross compile gcc <= 8 # gcc 10 is too strict to cross compile gcc <= 8
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv; stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;

View File

@ -82,7 +82,6 @@ let
atLeast8 = versionAtLeast version "8"; atLeast8 = versionAtLeast version "8";
atLeast7 = versionAtLeast version "7"; atLeast7 = versionAtLeast version "7";
atLeast6 = versionAtLeast version "6"; atLeast6 = versionAtLeast version "6";
atLeast49 = versionAtLeast version "4.9";
is14 = majorVersion == "14"; is14 = majorVersion == "14";
is13 = majorVersion == "13"; is13 = majorVersion == "13";
is12 = majorVersion == "12"; is12 = majorVersion == "12";
@ -92,7 +91,6 @@ let
is8 = majorVersion == "8"; is8 = majorVersion == "8";
is7 = majorVersion == "7"; is7 = majorVersion == "7";
is6 = majorVersion == "6"; is6 = majorVersion == "6";
is49 = majorVersion == "4" && versions.minor version == "9";
disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler);
@ -277,7 +275,7 @@ pipe ((callFile ./common/builder.nix {}) ({
outputs = outputs =
if atLeast7 if atLeast7
then [ "out" "man" "info" ] ++ optional (!langJit) "lib" then [ "out" "man" "info" ] ++ optional (!langJit) "lib"
else if atLeast49 && (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"] else if (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"]
else [ "out" "lib" "man" "info" ]; else [ "out" "lib" "man" "info" ];
setOutputFlags = false; setOutputFlags = false;
@ -460,7 +458,7 @@ pipe ((callFile ./common/builder.nix {}) ({
badPlatforms = badPlatforms =
# avr-gcc8 is maintained for the `qmk` package # avr-gcc8 is maintained for the `qmk` package
if (is8 && targetPlatform.isAvr) then [] if (is8 && targetPlatform.isAvr) then []
else if !(is49 || is6) then [ "aarch64-darwin" ] else if !(is6) then [ "aarch64-darwin" ]
else platforms.darwin; else platforms.darwin;
} // optionalAttrs is10 { } // optionalAttrs is10 {
badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ]; badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ];
@ -474,7 +472,7 @@ pipe ((callFile ./common/builder.nix {}) ({
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
} // optionalAttrs enableMultilib { } // optionalAttrs enableMultilib {
dontMoveLib64 = true; dontMoveLib64 = true;
} // optionalAttrs (((is49 && !stdenv.hostPlatform.isDarwin) || is6) && langJava) { } // optionalAttrs (is6 && langJava) {
postFixup = '' postFixup = ''
target="$(echo "$out/libexec/gcc"/*/*/ecj*)" target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target" patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"

View File

@ -1,24 +0,0 @@
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index aec950454..5bda9b3a3 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -156,18 +156,13 @@ namespace __sanitizer {
#elif defined(__sparc__)
# if defined(__arch64__)
unsigned mode;
- unsigned short __pad1;
-# else
- unsigned short __pad1;
- unsigned short mode;
unsigned short __pad2;
# endif
unsigned short __seq;
unsigned long long __unused1;
unsigned long long __unused2;
#else
- unsigned short mode;
- unsigned short __pad1;
+ unsigned int mode;
unsigned short __seq;
unsigned short __pad2;
#if defined(__x86_64__) && !defined(_LP64)

View File

@ -1,61 +0,0 @@
gcc/Makefile.in: fix parallel building failure
The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
config.h which was a generated file. But no explicity rule
to clarify the dependency. There was potential building
failure while parallel make.
For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
objects.
For errors.o, it is part of gengtype, and the gengtype generator program
is special: Two versions are built. One is for the build machine, and one
is for the host. We refered what gengtype-parse.o did (which also is part
of gengtype).
[GCC #61899]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
gcc/Makefile.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 6475cba..56e50bb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
hash-table.o file-find.o
+# Objects compiled from one C source file gcc-ar.c
+OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
+
# This lists all host objects for the front ends.
ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
$(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
- lto-wrapper.o
+ lto-wrapper.o $(OBJS-gcc-ar)
# This lists all host object files, whether they are included in this
# compilation or not.
@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
build/gengtype-parse.o: $(BCONFIG_H)
+errors.o : $(CONFIG_H)
+
gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
$(XREGEX_H)
--
1.8.1.2

View File

@ -34,7 +34,6 @@ let
atLeast8 = lib.versionAtLeast version "8"; atLeast8 = lib.versionAtLeast version "8";
atLeast7 = lib.versionAtLeast version "7"; atLeast7 = lib.versionAtLeast version "7";
atLeast6 = lib.versionAtLeast version "6"; atLeast6 = lib.versionAtLeast version "6";
atLeast49 = lib.versionAtLeast version "4.9";
is14 = majorVersion == "14"; is14 = majorVersion == "14";
is13 = majorVersion == "13"; is13 = majorVersion == "13";
is12 = majorVersion == "12"; is12 = majorVersion == "12";
@ -44,7 +43,6 @@ let
is8 = majorVersion == "8"; is8 = majorVersion == "8";
is7 = majorVersion == "7"; is7 = majorVersion == "7";
is6 = majorVersion == "6"; is6 = majorVersion == "6";
is49 = majorVersion == "4" && lib.versions.minor version == "9";
inherit (lib) optionals optional; inherit (lib) optionals optional;
in in
@ -239,8 +237,7 @@ in
## gcc 8.0 and older ############################################################################## ## gcc 8.0 and older ##############################################################################
# for 49 this is applied later ++ optional (!atLeast9) ./libsanitizer-no-cyclades-9.patch
++ optional (atLeast49 && !is49 && !atLeast9) ./libsanitizer-no-cyclades-9.patch
++ optional (is7 || is8) ./9/fix-struct-redefinition-on-glibc-2.36.patch ++ optional (is7 || is8) ./9/fix-struct-redefinition-on-glibc-2.36.patch
# Make Darwin bootstrap respect whether the assembler supports `--gstabs`, # Make Darwin bootstrap respect whether the assembler supports `--gstabs`,
@ -280,8 +277,8 @@ in
## gcc 6.0 and older ############################################################################## ## gcc 6.0 and older ##############################################################################
++ optional (is6 && langGo) ./gogcc-workaround-glibc-2.36.patch ++ optional (is6 && langGo) ./gogcc-workaround-glibc-2.36.patch
++ optional (is49 || is6) ./9/fix-struct-redefinition-on-glibc-2.36.patch ++ optional is6 ./9/fix-struct-redefinition-on-glibc-2.36.patch
++ optional (is49 || (is6 && !stdenv.targetPlatform.isRedox)) ./use-source-date-epoch.patch ++ optional (is6 && !stdenv.targetPlatform.isRedox) ./use-source-date-epoch.patch
++ optional (is6 && !stdenv.targetPlatform.isRedox) ./6/0001-Fix-build-for-glibc-2.31.patch ++ optional (is6 && !stdenv.targetPlatform.isRedox) ./6/0001-Fix-build-for-glibc-2.31.patch
++ optionals (is6 && langAda) [ ++ optionals (is6 && langAda) [
./gnat-cflags.patch ./gnat-cflags.patch
@ -297,51 +294,7 @@ in
# defaults to the impure, system location and causes the build to fail. # defaults to the impure, system location and causes the build to fail.
++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch ++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch
## gcc 4.9 and older ############################################################################## ## gcc 5.0 and older ##############################################################################
++ optional (!atLeast6) ./parallel-bconfig.patch ++ optional (!atLeast6) ./parallel-bconfig.patch
++ optionals (is49) [
(./. + "/${lib.versions.major version}.${lib.versions.minor version}/parallel-strsignal.patch")
(./. + "/${lib.versions.major version}.${lib.versions.minor version}/libsanitizer.patch")
(fetchpatch {
name = "avoid-ustat-glibc-2.28.patch";
url = "https://gitweb.gentoo.org/proj/gcc-patches.git/plain/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch?id=55fcb515620a8f7d3bb77eba938aa0fcf0d67c96";
sha256 = "0b32sb4psv5lq0ij9fwhi1b4pjbwdjnv24nqprsk14dsc6xmi1g0";
})
# has to be applied after "avoid-ustat-glibc-2.28.patch"
./libsanitizer-no-cyclades-9.patch
# glibc-2.26
./struct-ucontext.patch
./struct-sigaltstack-4.9.patch
]
# Retpoline patches pulled from the branch hjl/indirect/gcc-4_9-branch (by H.J. Lu, the author of GCC upstream retpoline commits)
++ optionals is49
(builtins.map ({commit, sha256}: fetchpatch {url = "https://github.com/hjl-tools/gcc/commit/${commit}.patch"; inherit sha256;})
[{ commit = "e623d21608e96ecd6b65f0d06312117d20488a38"; sha256 = "1ix8i4d2r3ygbv7npmsdj790rhxqrnfwcqzv48b090r9c3ij8ay3"; }
{ commit = "2015a09e332309f12de1dadfe179afa6a29368b8"; sha256 = "0xcfs0cbb63llj2gbcdrvxim79ax4k4aswn0a3yjavxsj71s1n91"; }
{ commit = "6b11591f4494f705e8746e7d58b7f423191f4e92"; sha256 = "0aydyhsm2ig0khgbp27am7vq7liyqrq6kfhfi2ki0ij0ab1hfbga"; }
{ commit = "203c7d9c3e9cb0f88816b481ef8e7e87b3ecc373"; sha256 = "0wqn16y7wy5kg8ngfcni5qdwfphl01axczibbk49bxclwnzvldqa"; }
{ commit = "f039c6f284b2c9ce97c8353d6034978795c4872e"; sha256 = "13fkgdb17lpyxfksz1zanxhgpsm0jrss9w61nbl7an4im22hz7ci"; }
{ commit = "ed42606bdab1c5d9e5ad828cd6fe1a0557f193b7"; sha256 = "0gdnn8v3p03imj3qga2mzdhpgbmjcklkxdl97jvz5xia2ikzknxm"; }
{ commit = "5278e062ef292fd2fbf987d25389785f4c5c0f99"; sha256 = "0j81x758wf8v7j4rx5wc1cy7yhkvhlhv3wmnarwakxiwsspq0vrs"; }
{ commit = "76f1ffbbb6cd9f6ecde6c82cd16e20a27242e890"; sha256 = "1py56y6gp7fjf4f8bbsfwh5bs1gnmlqda1ycsmnwlzfm0cshdp0c"; }
{ commit = "4ca48b2b688b135c0390f54ea9077ef10aedd52c"; sha256 = "15r019pzr3k0lpgyvdc92c8fayw8b5lrzncna4bqmamcsdz7vsaw"; }
{ commit = "98c7bf9ddc80db965d69d61521b1c7a1cec32d9a"; sha256 = "1d7pfdv1q23nf0wadw7jbp6d6r7pnzjpbyxgbdfv7j1vr9l1bp60"; }
{ commit = "3dc76b53ad896494ca62550a7a752fecbca3f7a2"; sha256 = "0jvdzfpvfdmklfcjwqblwq1i22iqis7ljpvm7adra5d7zf2xk7xz"; }
{ commit = "1e961ed49b18e176c7457f53df2433421387c23b"; sha256 = "04dnqqs4qsvz4g8cq6db5id41kzys7hzhcaycwmc9rpqygs2ajwz"; }
{ commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }])
++ optional (is49 && !atLeast6) [
# gcc-11 compatibility
(fetchpatch {
name = "gcc4-char-reload.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58";
includes = [ "gcc/reload.h" ];
sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM=";
})
]
## gcc 4.8 only ##############################################################################
++ optional (!atLeast49 && hostPlatform.isDarwin) ./gfortran-darwin-NXConstStr.patch

View File

@ -1,27 +0,0 @@
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@codesourcery.com>
Date: Sat, 21 Dec 2013 00:30:18 +0000
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
---
gcc/config/darwin.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 40804b8..0080299 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
void
darwin_mark_decl_preserved (const char *name)
{
+ /* Actually we shouldn't mark any local symbol this way, but for now
+ this only happens with ObjC meta-data. */
+ if (darwin_label_is_anonymous_local_objc_name (name))
+ return;
+
fprintf (asm_out_file, "\t.no_dead_strip ");
assemble_name (asm_out_file, name);
fputc ('\n', asm_out_file);
--
2.2.1

View File

@ -1,78 +0,0 @@
hand-resolved trivial conflicts for 4.9 from the upstream patch
72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
index 69c9c10..8e53673 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
@@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
}
-uptr internal_sigaltstack(const struct sigaltstack *ss,
- struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
}
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
index 6422df1..8e111d1 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
@@ -18,7 +18,6 @@
#include "sanitizer_platform_limits_posix.h"
struct link_map; // Opaque type returned by dlopen().
-struct sigaltstack;
namespace __sanitizer {
// Dirent structure for getdents(). Note that this structure is different from
@@ -28,8 +27,7 @@ struct linux_dirent;
// Syscall wrappers.
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
- struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
__sanitizer_kernel_sigaction_t *oldact);
uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
index 891386dc..234e8c6 100644
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
// Alternate stack for signal handling.
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
- struct sigaltstack handler_stack;
+ stack_t handler_stack;
internal_memset(&handler_stack, 0, sizeof(handler_stack));
handler_stack.ss_sp = handler_stack_memory.data();
handler_stack.ss_size = kHandlerStackSize;
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
index 2ed5718..6f972ab 100644
--- a/libsanitizer/tsan/tsan_platform_linux.cc
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
@@ -287,7 +287,7 @@ void InitializePlatform() {
int ExtractResolvFDs(void *state, int *fds, int nfd) {
#if SANITIZER_LINUX && !SANITIZER_ANDROID
int cnt = 0;
- __res_state *statp = (__res_state*)state;
+ struct __res_state *statp = (struct __res_state*)state;
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
fds[cnt++] = statp->_u._ext.nssocks[i];
error: 'SIGSEGV' was not declared in this scope
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
index 0692eb1..472f734 100644
--- a/libsanitizer/asan/asan_linux.cc
+++ b/libsanitizer/asan/asan_linux.cc
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <unwind.h>

View File

@ -1,190 +0,0 @@
From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 4 Jul 2017 10:23:57 +0000
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
Current glibc no longer gives the ucontext_t type the tag struct
ucontext, to conform with POSIX namespace rules. This requires
various linux-unwind.h files in libgcc, that were previously using
struct ucontext, to be fixed to use ucontext_t instead. This is
similar to the removal of the struct siginfo tag from siginfo_t some
years ago.
This patch changes those files to use ucontext_t instead. As the
standard name that should be unconditionally safe, so this is not
restricted to architectures supported by glibc, or conditioned on the
glibc version.
Tested compilation together with current glibc with glibc's
build-many-glibcs.py.
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
config/pa/linux-unwind.h (pa32_fallback_frame_state),
config/sh/linux-unwind.h (sh_fallback_frame_state),
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
ucontext_t instead of struct ucontext.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
---
libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++
libgcc/config/aarch64/linux-unwind.h | 2 +-
libgcc/config/alpha/linux-unwind.h | 2 +-
libgcc/config/bfin/linux-unwind.h | 2 +-
libgcc/config/i386/linux-unwind.h | 4 ++--
libgcc/config/m68k/linux-unwind.h | 2 +-
libgcc/config/nios2/linux-unwind.h | 2 +-
libgcc/config/pa/linux-unwind.h | 2 +-
libgcc/config/sh/linux-unwind.h | 2 +-
libgcc/config/tilepro/linux-unwind.h | 2 +-
libgcc/config/xtensa/linux-unwind.h | 2 +-
11 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
index 4512efb..06de45a 100644
--- a/libgcc/config/aarch64/linux-unwind.h
+++ b/libgcc/config/aarch64/linux-unwind.h
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe
{
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
};
struct rt_sigframe *rt_;
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
index bdbba4a..e84812e 100644
--- a/libgcc/config/alpha/linux-unwind.h
+++ b/libgcc/config/alpha/linux-unwind.h
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
}
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
index 77b7c23..8bf5e82 100644
--- a/libgcc/config/bfin/linux-unwind.h
+++ b/libgcc/config/bfin/linux-unwind.h
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
void *puc;
char retcode[8];
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
index 540a0a2..29efbe3 100644
--- a/libgcc/config/i386/linux-unwind.h
+++ b/libgcc/config/i386/linux-unwind.h
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
if (*(unsigned char *)(pc+0) == 0x48
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
{
- struct ucontext *uc_ = context->cfa;
+ ucontext_t *uc_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
because it does not alias anything. */
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
siginfo_t *pinfo;
void *puc;
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
index 75b7cf7..f964e24 100644
--- a/libgcc/config/m68k/linux-unwind.h
+++ b/libgcc/config/m68k/linux-unwind.h
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* <sys/ucontext.h> is unfortunately broken right now. */
struct uw_ucontext {
unsigned long uc_flags;
- struct ucontext *uc_link;
+ ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
unsigned long uc_filler[80];
diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
index 2304142..30f25ea 100644
--- a/libgcc/config/nios2/linux-unwind.h
+++ b/libgcc/config/nios2/linux-unwind.h
@@ -38,7 +38,7 @@ struct nios2_mcontext {
struct nios2_ucontext {
unsigned long uc_flags;
- struct ucontext *uc_link;
+ ucontext_t *uc_link;
stack_t uc_stack;
struct nios2_mcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
index 9a2657f..e47493d 100644
--- a/libgcc/config/pa/linux-unwind.h
+++ b/libgcc/config/pa/linux-unwind.h
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *frame;
/* rt_sigreturn trampoline:
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
index e389cac..0bf43ba 100644
--- a/libgcc/config/sh/linux-unwind.h
+++ b/libgcc/config/sh/linux-unwind.h
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
index 796e976..75f8890 100644
--- a/libgcc/config/tilepro/linux-unwind.h
+++ b/libgcc/config/tilepro/linux-unwind.h
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_;
/* Return if this is not a signal handler. */
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
index 9872492..586a9d4 100644
--- a/libgcc/config/xtensa/linux-unwind.h
+++ b/libgcc/config/xtensa/linux-unwind.h
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_;
/* movi a2, __NR_rt_sigreturn; syscall */
--
2.9.3

View File

@ -9,7 +9,6 @@ let
"8" = "8.5.0"; "8" = "8.5.0";
"7" = "7.5.0"; "7" = "7.5.0";
"6" = "6.5.0"; "6" = "6.5.0";
"4.9"= "4.9.4";
}; };
fromMajorMinor = majorMinorVersion: fromMajorMinor = majorMinorVersion:
@ -26,7 +25,6 @@ let
"8.5.0" = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k"; "8.5.0" = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k";
"7.5.0" = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq"; "7.5.0" = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
"6.5.0" = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby"; "6.5.0" = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
"4.9.4" = "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc";
}."${version}"; }."${version}";
in { in {

View File

@ -1,4 +1,8 @@
{ stdenv, lib, idris2, makeWrapper {
stdenv,
lib,
idris2,
makeBinaryWrapper,
}: }:
# Usage: let # Usage: let
# pkg = idris2Packages.buildIdris { # pkg = idris2Packages.buildIdris {
@ -11,49 +15,57 @@
# bin = pkg.executable; # bin = pkg.executable;
# } # }
# #
{ src {
, ipkgName src,
, version ? "unversioned" ipkgName,
, idrisLibraries # Other libraries built with buildIdris version ? "unversioned",
, ... }@attrs: idrisLibraries, # Other libraries built with buildIdris
...
}@attrs:
let let
# loop over idrisLibraries and normalize them by turning any that are # loop over idrisLibraries and normalize them by turning any that are
# direct outputs of the buildIdris function into the `.library {}` # direct outputs of the buildIdris function into the `.library {}`
# property. # property.
idrisLibraryLibs = map (idrisLib: idrisLibraryLibs = map (
if lib.isDerivation idrisLib idrisLib:
then idrisLib if lib.isDerivation idrisLib then
else if builtins.isFunction idrisLib idrisLib
then idrisLib {} else if builtins.isFunction idrisLib then
else if (builtins.isAttrs idrisLib && idrisLib ? "library") idrisLib { }
then idrisLib.library {} else if (builtins.isAttrs idrisLib && idrisLib ? "library") then
else throw "Found an Idris2 library dependency that was not the result of the buildIdris function" idrisLib.library { }
else
throw "Found an Idris2 library dependency that was not the result of the buildIdris function"
) idrisLibraries; ) idrisLibraries;
propagate = libs: lib.unique (lib.concatMap (nextLib: [nextLib] ++ nextLib.propagatedIdrisLibraries) libs); propagate =
libs: lib.unique (lib.concatMap (nextLib: [ nextLib ] ++ nextLib.propagatedIdrisLibraries) libs);
ipkgFileName = ipkgName + ".ipkg"; ipkgFileName = ipkgName + ".ipkg";
idrName = "idris2-${idris2.version}"; idrName = "idris2-${idris2.version}";
libSuffix = "lib/${idrName}"; libSuffix = "lib/${idrName}";
propagatedIdrisLibraries = propagate idrisLibraryLibs; propagatedIdrisLibraries = propagate idrisLibraryLibs;
libDirs = libDirs = (lib.makeSearchPath libSuffix propagatedIdrisLibraries) + ":${idris2}/${idrName}";
(lib.makeSearchPath libSuffix propagatedIdrisLibraries) +
":${idris2}/${idrName}";
supportDir = "${idris2}/${idrName}/lib"; supportDir = "${idris2}/${idrName}/lib";
drvAttrs = builtins.removeAttrs attrs [ drvAttrs = builtins.removeAttrs attrs [
"ipkgName" "ipkgName"
"idrisLibraries" "idrisLibraries"
]; ];
derivation = stdenv.mkDerivation (finalAttrs: derivation = stdenv.mkDerivation (
drvAttrs // { finalAttrs:
drvAttrs
// {
pname = ipkgName; pname = ipkgName;
inherit version; inherit version;
src = src; src = src;
nativeBuildInputs = [ idris2 makeWrapper ] ++ attrs.nativeBuildInputs or []; nativeBuildInputs = [
buildInputs = propagatedIdrisLibraries ++ attrs.buildInputs or []; idris2
makeBinaryWrapper
] ++ attrs.nativeBuildInputs or [ ];
buildInputs = propagatedIdrisLibraries ++ attrs.buildInputs or [ ];
IDRIS2_PACKAGE_PATH = libDirs; env.IDRIS2_PACKAGE_PATH = libDirs;
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
@ -63,15 +75,16 @@ let
passthru = { passthru = {
inherit propagatedIdrisLibraries; inherit propagatedIdrisLibraries;
}; } // (attrs.passthru or { });
shellHook = '' shellHook = ''
export IDRIS2_PACKAGE_PATH="${finalAttrs.IDRIS2_PACKAGE_PATH}" export IDRIS2_PACKAGE_PATH="${finalAttrs.env.IDRIS2_PACKAGE_PATH}"
''; '';
} }
); );
in { in
{
executable = derivation.overrideAttrs { executable = derivation.overrideAttrs {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -97,9 +110,14 @@ in {
''; '';
}; };
library = { withSource ? false }: library =
let installCmd = if withSource then "--install-with-src" else "--install"; {
in derivation.overrideAttrs { withSource ? false,
}:
let
installCmd = if withSource then "--install-with-src" else "--install";
in
derivation.overrideAttrs {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p $out/${libSuffix} mkdir -p $out/${libSuffix}

Some files were not shown because too many files have changed in this diff Show More