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"
```
Currently, it is quite hard to override anything about dfhack (for
example, to add plugins at build time), because
1. it is not exposed anywhere, so you have to do something like
`dwarf-fortress.override (oldArgs: { dfhack = oldArgs.dfhack.override...; })`
2. the final `dfhack` derivation is a `buildEnv`, so `overrideAttrs`
doesn't work as expected.
This fixes 1 by adding `dfhack` to the wrapper's `passthru`, and 2 by
moving `twbt.lib` (which is the only reason for the dfhack `buildEnv`)
into the wrapper.
Also adds an `extraPackages` argument to the wrapper, and copies `*.init`
files from the env to the DF directory so that we can easily add a
`dfhack.init`.
With these changes, I was able to build dfhack with the dfplex plugin.
This will make it easier for people to access old versions.
You can now access attributes like:
- dwarf-fortress_0_44_11
- dwarf-fortress_0_43_05
- etc.
game.json now contains a dictionary of old game hashes. I have added
them for the last 3 releases.
- add script to generate hashes
Makes it much easier to update game.json file.
- add updateScript meta
This adds some info on the ./update.sh updateScript now available.
- cleanup updateScript
- Add some more systems
- Correctly detect source extensions (.zip or .tar.bz2)
- Proper bash quoting
- fix update.sh
- correctly detect latest df version
- append to game.json instead of overwriting it
- update hashes for 44.12
To use stonesense, build dwarf-fortress with `enableDFHack=true` and
`enableStoneSense=true`, then type `ssense` into the dfhack console.
This partially reverts commit 85056ee698
Theme can be specified either as a derivation or as a string, in which
case it will be taken by name from a pre-defined set of themes available in
nixpkgs.