Skip to content

Commit

Permalink
Convert to flake
Browse files Browse the repository at this point in the history
  • Loading branch information
siraben committed Feb 5, 2021
1 parent 7470285 commit f512211
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 221 deletions.
17 changes: 9 additions & 8 deletions default.nix
@@ -1,8 +1,9 @@
{ sources ? import ./nix/sources.nix { }
, pkgs ? import sources.nixpkgs { }
}:
let
# Nixpkgs extended with bootstrappable related packages
bootstrappable-pkgs = import ./pkgs { };
in
bootstrappable-pkgs
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash; }
) {
src = ./.;
}).defaultNix
59 changes: 59 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions flake.nix
@@ -0,0 +1,22 @@
{
description = "blynn-compiler";
inputs = {
nixpkgs.url = "nixpkgs/release-20.09";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};

outputs = { self, nixpkgs, utils, ... }:
utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
overlay = import ./overlay.nix;
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
in {
inherit overlay;
inherit (pkgs) blynn-compiler;
defaultPackage = pkgs.blynn-compiler;
});
}
26 changes: 0 additions & 26 deletions nix/sources.json

This file was deleted.

171 changes: 0 additions & 171 deletions nix/sources.nix

This file was deleted.

11 changes: 11 additions & 0 deletions overlay.nix
@@ -0,0 +1,11 @@
# Bootstrappable packages as a Nixpkgs overlay
final: prev:

{
blynn-compiler = prev.callPackage ./pkgs/blynn-compiler.nix { };
kaem = prev.callPackage ./pkgs/kaem.nix { };
m2-planet = prev.callPackage ./pkgs/m2-planet.nix { };
mes-m2 = prev.callPackage ./pkgs/mes-m2.nix { };
mescc-tools = prev.callPackage ./pkgs/mescc-tools.nix { };
mescc-tools-seed = prev.callPackage ./pkgs/mescc-tools-seed.nix { };
}
5 changes: 0 additions & 5 deletions pkgs/default.nix

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/packages.nix

This file was deleted.

0 comments on commit f512211

Please sign in to comment.