diff --git a/flake.nix b/flake.nix index 8b3545b..b819c0d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "ECP5 toolchain template project"; + description = "LiteX overlay to provide those packages"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -62,6 +62,10 @@ packages = forAllSystems ( pkgs: builtins.mapAttrs (name: value: pkgs.python3Packages.callPackage value { }) litex-pkgs ); + templates.default = { + path = ./templates/default; + description = "basic template to get started with an ecp5"; + }; # example, not really something you should import unless you want everything. devShells = forAllSystems (pkgs: { diff --git a/templates/default/flake.nix b/templates/default/flake.nix index dc09248..bcd3dc7 100644 --- a/templates/default/flake.nix +++ b/templates/default/flake.nix @@ -3,20 +3,12 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + litex-overlay.url = "git+https://git.saji.dev/saji/litex-overlay"; }; outputs = - inputs@{ nixpkgs, ... }: + inputs@{ nixpkgs, litex-overlay ... }: let - # litex-overlay = final: prev: { - # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - # (python-final: python-prev: { - # litex = python-final.callPackage (import ./litex.nix) { }; - # # can add more packages here! - # }) - # ]; - # }; - litex-overlay = import ./litex; systems = [ "x86_64-linux" "aarch64-linux" @@ -32,7 +24,7 @@ inherit system; config.allowUnfree = true; overlays = [ - litex-overlay + litex-overlay.overlays.default ]; # patches, version pins, new pkgs here. } )