Commit Graph

12 Commits

Author SHA1 Message Date
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
adisbladis
e0816431a2 treewide: Pass self when overriding Python
Otherwise references to the Python interpreter inside the set are wrong, as demonstrated by:
``` nix
with import <nixpkgs> { };
let
  python' = python3.override {
    packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337";  }); };
  };
in python'.pkgs.python.pkgs.requests
```
which returns the _non_ overriden requests.

And the same with `self`:
```
with import <nixpkgs> { };
let
  python' = python3.override {
    self = python';
    packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337";  }); };
  };
in python'.pkgs.python.pkgs.requests
```
which returns the overriden requests.

This can manifest itself as file collisions when constructing environments or as subtly incorrect dependency graphs.
2024-08-03 12:18:56 +12:00
Martin Weinelt
abdf5dc772
treewide: remove pythonRelaxDepsHook references
It is is now provided automatically, when `pythonRelaxDeps` or
`pythonRemoveDeps` is defined through `mk-python-derivation`.
2024-06-14 14:52:00 +02:00
Thiago Kenji Okada
99b9a12a15 netexec: 1.1.0 -> 1.1.0-unstable-2024-01-15 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
78f2aadaec netexec: mark as broken in Darwin 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
7e42155024 netexec: remove incorrectly included dependency from upstream 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
ee64dd7411 netexec: remove some declared dependencies 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
29c1267fab netexec: fix version format in custom impacket override 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
9f13a17f17 netexec: fix test by using pytestCheckHook 2024-01-23 12:53:58 +00:00
Thiago Kenji Okada
cf50dc9229 python3Packages.dploot: init at 2.2.4 2024-01-23 12:53:57 +00:00
Thiago Kenji Okada
ebf0638943 netexec: remove unnecessary package override 2024-01-23 12:53:57 +00:00
Vinicius Bernardino
07520a61c5 netexec: init at 1.1.0
Netexec is the fork of crackmapexec that will be maintened for now on.
2023-12-19 20:35:59 -03:00