forked from auxolotl/foundation
Compare commits
6 commits
921fd24635
...
187b21870e
| Author | SHA1 | Date | |
|---|---|---|---|
| 187b21870e | |||
| 9a32c3d132 | |||
| deb8e03cb2 | |||
| f39cac8cae | |||
| 7344532f72 | |||
| 032292458a |
4 changed files with 54 additions and 7 deletions
52
README.md
52
README.md
|
|
@ -9,7 +9,7 @@ Packages can be imported both with and without Nix Flakes. To import them using
|
|||
add this repository as an input.
|
||||
|
||||
```nix
|
||||
inputs.foundation.url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz?dir=foundation";
|
||||
inputs.foundation.url = "https://git.auxolotl.org/auxolotl/foundation/archive/main.tar.gz";
|
||||
```
|
||||
|
||||
To import this library without using Nix Flakes, you will need to use `fetchTarball` and
|
||||
|
|
@ -17,11 +17,11 @@ import the library entrypoint.
|
|||
|
||||
```nix
|
||||
let
|
||||
labs = builtins.fetchTarball {
|
||||
url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz";
|
||||
foundation_tarball = builtins.fetchTarball {
|
||||
url = "https://git.auxolotl.org/auxolotl/foundation/archive/main.tar.gz";
|
||||
sha256 = "<sha256>";
|
||||
};
|
||||
foundation = import "${labs}/foundation" {
|
||||
foundation = import foundation_tarball {
|
||||
# Specifying a system is optional. By default it will use the current system.
|
||||
system = "i686-linux";
|
||||
};
|
||||
|
|
@ -29,6 +29,50 @@ in
|
|||
# ...
|
||||
```
|
||||
|
||||
### Bypassing Geoblocking
|
||||
|
||||
If you get an error(possibly with different hashes) such as
|
||||
|
||||
```
|
||||
error: hash mismatch in file downloaded from 'https://repo.or.cz/tinycc.git/snapshot/fd6d2180c5c801bb0b4c5dde27d61503059fc97d.tar.gz':
|
||||
specified: sha256-R81SNbEmh4s9FNQxCWZwUiMCYRkkwOHAdRf0aMnnRiA=
|
||||
got: sha256-YFl5pQIdfJAn4ijH1UU8OY+DRtJ0LPd5r0eoIF8iyMI=
|
||||
```
|
||||
|
||||
and you're in the UK, you will need to manually add the tinycc revisions to the store, because of
|
||||
Online Safety Act-caused geoblocking.
|
||||
|
||||
If you have [Tor](https://www.torproject.org/) running, you can use it as a proxy with the below
|
||||
script to manually add the items to your nix store.
|
||||
|
||||
```
|
||||
curl --proxy socks5://localhost:9050 -LO https://repo.or.cz/tinycc.git/snapshot/86f3d8e33105435946383aee52487b5ddf918140.tar.gz
|
||||
curl --proxy socks5://localhost:9050 -LO https://repo.or.cz/tinycc.git/snapshot/fd6d2180c5c801bb0b4c5dde27d61503059fc97d.tar.gz
|
||||
|
||||
nix-store --add-fixed sha256 86f3d8e33105435946383aee52487b5ddf918140.tar.gz
|
||||
nix-store --add-fixed sha256 fd6d2180c5c801bb0b4c5dde27d61503059fc97d.tar.gz
|
||||
```
|
||||
|
||||
Alternatively, use a VPN or some other form of proxy to download the files
|
||||
|
||||
* <https://repo.or.cz/tinycc.git/snapshot/86f3d8e33105435946383aee52487b5ddf918140.tar.gz>
|
||||
* <https://repo.or.cz/tinycc.git/snapshot/fd6d2180c5c801bb0b4c5dde27d61503059fc97d.tar.gz>
|
||||
|
||||
and add them to your nix store as shown above.
|
||||
|
||||
This will fix the build until a garbage collection run.
|
||||
|
||||
### `ftpmirror.gnu.org` HTTP errors
|
||||
|
||||
If you get an error such as
|
||||
|
||||
`error: unable to download 'https://ftpmirror.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz': HTTP error 403
|
||||
(Forbidden)`
|
||||
|
||||
or any other HTTP error, try re-running the build. Some of the mirrors in the `ftpmirror.gnu.org`
|
||||
pool may be flaky, and retrying will get a different mirror chosen. Once it's downloaded, it will
|
||||
be cached in your nix store, so you won't run into the issue again until a garbage collection run.
|
||||
|
||||
## Development
|
||||
|
||||
This foundational package set is created using modules. Each builder and package is separated
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
options.aux.mirrors = {
|
||||
gnu = lib.options.create {
|
||||
type = lib.types.string;
|
||||
default.value = "https://ftp.gnu.org/gnu";
|
||||
default.value = "https://ftpmirror.gnu.org/gnu";
|
||||
description = "The GNU mirror to use";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ in
|
|||
--prefix=$out \
|
||||
--build=${platform.build} \
|
||||
--host=${platform.host} \
|
||||
--without-bash-malloc
|
||||
--without-bash-malloc \
|
||||
bash_cv_func_sigsetjmp=n
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES SHELL=bash
|
||||
|
|
|
|||
|
|
@ -103,12 +103,14 @@ in
|
|||
export CC=musl-gcc
|
||||
export C_INCLUDE_PATH="${stage1.zlib.package}/include"
|
||||
export LIBRARY_PATH="${stage1.zlib.package}/lib"
|
||||
export LD_LIBRARY_PATH="$LIBRARY_PATH"
|
||||
export LDFLAGS="-Wl,-rpath,${stage1.zlib.package}/lib"
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${platform.build} \
|
||||
--host=${platform.host}
|
||||
|
||||
export SOURCE_DATE_EPOCH=0
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue