Browse Source

Refactor nix files

master
Knarkzel 2 years ago
parent
commit
7a140ae9ee
  1. 23
      devkitppc.nix
  2. 14
      extract-docker.nix

23
devkitppc.nix

@ -1,30 +1,27 @@ @@ -1,30 +1,27 @@
{pkgs ? import <nixpkgs> {}}:
with pkgs; rec {
devkitppc-img = dockerTools.pullImage {
let
pkgs = import <nixpkgs> {};
devkitppc-img = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitppc";
imageDigest = "sha256:77ed88cb417e057fa805e12a8ce1eab8865fe35a761cde7be00315d5c6cba288";
sha256 = "LLFLDSPJ/tCRBLj0f9q34b5GVHnHudFCgkb7ppMm8VI=";
finalImageName = "devkitpro/devkitppc";
finalImageTag = "20200704";
};
devkitpro = stdenv.mkDerivation {
in {
devkitpro = pkgs.stdenv.mkDerivation {
name = "devkitpro";
src = import ./extract-docker.nix {
pkgs = pkgs;
image = devkitppc-img;
directory = "/opt/devkitpro";
};
nativeBuildInputs = [
autoPatchelfHook
pkgs.autoPatchelfHook
];
buildInputs = [
stdenv.cc.cc
openssl
zlib
libarchive
ncurses5
expat
tlf
pkgs.stdenv.cc.cc
pkgs.ncurses5
pkgs.expat
];
buildPhase = "true";
installPhase = ''

14
extract-docker.nix

@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
{
pkgs,
image,
directory,
pkgs ? import <nixpkgs> {},
}:
pkgs.vmTools.runInLinuxVM (
pkgs.runCommand "docker-preload-image" {
memSize = 8 * 1024;
buildInputs = with pkgs; [
curl
kmod
docker
e2fsprogs
utillinux
buildInputs = [
pkgs.curl
pkgs.kmod
pkgs.docker
pkgs.e2fsprogs
pkgs.utillinux
];
}
''

Loading…
Cancel
Save