about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable-toolchain/default.nix
blob: 643e28e82b275f9b7b23510ec66a10ee3a02246e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchurl, libarchive, python, file, which }:

stdenv.mkDerivation rec {
  pname = "remarkable-toolchain";
  version = "1.8-23.9.2019";

  src = fetchurl {
    url = "https://remarkable.engineering/oecore-x86_64-cortexa9hf-neon-toolchain-zero-gravitas-${version}.sh";
    sha256 = "1rk1r80m5d18sw6hrybj6f78s8pna0wrsa40ax6j8jzfwahgzmfb";
    executable = true;
  };

  nativeBuildInputs = [
    libarchive
    python
    file
    which
  ];

  dontUnpack = true;
  dontBuild = true;

  installPhase = ''
    mkdir -p $out
    ENVCLEANED=1 $src -y -d $out
  '';

  meta = with lib; {
    description = "A toolchain for cross-compiling to reMarkable tablets";
    homepage = "https://remarkable.engineering/";
    license = licenses.gpl2;
    maintainers = with maintainers; [ nickhu siraben ];
    platforms = [ "x86_64-linux" ];
  };
}