CeDOS - Commit 89269aab

Add nix-shell for cross compiler Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
Celina Sophie Kalus
Sun, 01 Jun 2025 15:03:18 +0200
3 files changed, 63 insertions(+), 0 deletions(-)
A flake.lock

@@ -0,0 +1,27 @@

+{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1730272153, + "narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +}
A flake.nix

@@ -0,0 +1,20 @@

+{ + inputs = + { + nixpkgs.url = "github:NixOS/nixpkgs/2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53"; # nixpkgs-unstable as of 2024-10-31T18:10+01:00 + #cedos-gcc.url = "file:///home/dersuchmann/i686-elf-gcc-12.2.0.tar.gz"; + #cedos-gcc.flake = false; + } + ; + + outputs = { self, nixpkgs }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.${system}.default = + (import ./shell.nix { inherit pkgs; }); # The value of this expression is a derivation + } + ; +}
A shell.nix

@@ -0,0 +1,16 @@

+#!/usr/bin/nix-shell +{ pkgs ? import <nixpkgs> {} }: + +pkgs.mkShell { + nativeBuildInputs = + with pkgs; [ + # qemu + pkgsCross.i686-embedded.buildPackages.gcc + ] + ; + shellHook = + '' + echo 'exec ${builtins.getEnv "SHELL"}' + '' + ; +}