Skip to content

Commit

Permalink
Nix maintanence
Browse files Browse the repository at this point in the history
- stdenv.lib has been deprecated (NixOS/nixpkgs#108938)
- replace linuxkit-nix (unmaintained) with nix-docker
- updated niv sources
  • Loading branch information
siraben committed Jan 7, 2022
1 parent 2c28bd4 commit 843fb6e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ Here is an outdated video of it in action:
Install the reMarkable toolchain and then run `make release`. It will produce a folder named `release` containing all the output.

### Nix
Works on x86_64-linux or macOS with
[linuxkit-nix](https://github.com/nix-community/linuxkit-nix).
Works on x86_64-linux or macOS via [nix-docker](https://github.com/LnL7/nix-docker).

```ShellSession
$ nix build
$ nix-build --argstr system 'x86_64-linux'
```
12 changes: 6 additions & 6 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "ba57d5a29b4e0f2085917010380ef3ddc3cf380f",
"sha256": "1kpsvc53x821cmjg1khvp1nz7906gczq8mp83664cr15h94sh8i4",
"rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c",
"sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/ba57d5a29b4e0f2085917010380ef3ddc3cf380f.tar.gz",
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nix-inclusive": {
Expand All @@ -29,10 +29,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "db103e0f98d461f3e66cd68702492afca0810db5",
"sha256": "19gz926nqv7ggq281mv2qi1ah6a5slg2vvhsvc5jdnkp28m8f55k",
"rev": "77fda7f672726e1a95c8cd200f27bccfc86c870b",
"sha256": "07qj1d45pkqsmkahbhh7hilwwbvg8vlz1wg497hzjrlx1a57v4y5",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/db103e0f98d461f3e66cd68702492afca0810db5.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/77fda7f672726e1a95c8cd200f27bccfc86c870b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
5 changes: 4 additions & 1 deletion nix/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ let
saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name;
ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
in
if ersatz == "" then drv else ersatz;
if ersatz == "" then drv else
# this turns the string into an actual Nix path (for both absolute and
# relative paths)
if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";

# Ports of functions for older nix versions

Expand Down
4 changes: 2 additions & 2 deletions oxide.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, inclusive, qt512, remarkable-toolchain }:
{ stdenv, lib, fetchFromGitHub, inclusive, qt512, remarkable-toolchain }:

stdenv.mkDerivation {
name = "oxide";
Expand All @@ -24,7 +24,7 @@ stdenv.mkDerivation {
cp -r release/. $out
'';

meta = with stdenv.lib; {
meta = with lib; {
description = "A launcher application for the reMarkable tablet";
platform = [ "x86_64-linux" ];
maintainers = [ maintainers.siraben ];
Expand Down

0 comments on commit 843fb6e

Please sign in to comment.