Add 2i-emulator to packages

This commit is contained in:
Malte Tammena 2021-06-26 21:09:22 +02:00
parent e27042ef05
commit c2960a467f
4 changed files with 74 additions and 28 deletions

View file

@ -1,12 +1,28 @@
{
"nodes": {
"2i-emulator": {
"flake": false,
"locked": {
"lastModified": 1591541808,
"narHash": "sha256-mSRZ0Lsuono5rY7JV2jk109zDGZzYkBfpnRH2SlrkcY=",
"owner": "klemens",
"repo": "2i-emulator",
"rev": "3bd74bdeffbc6340ef4455269090cf50d07e2e5f",
"type": "github"
},
"original": {
"owner": "klemens",
"repo": "2i-emulator",
"type": "github"
}
},
"cachix": {
"locked": {
"lastModified": 1623585158,
"narHash": "sha256-AjK7M1/six8IBPOI28nm7yC2k8mZIR2F9QrOwFYHAS0=",
"lastModified": 1624097864,
"narHash": "sha256-TGayVqD42Hze4gg5Eurfd7W4zINdHp81JZAyR8q+Oos=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "115dbbe82eb4ec8aabf959068286468a68e0b244",
"rev": "69f3a9705014ce75b0489404210995fb6f29836e",
"type": "github"
},
"original": {
@ -107,11 +123,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1623793605,
"narHash": "sha256-8LaC7Y+Z+TTZuTvBL/mlfkEQ6Ey0hwwAeVUmY95Tni4=",
"lastModified": 1624214437,
"narHash": "sha256-BtB6k1mQXG/P8MUlNVcuboQqlxlks2H6i5vj2pbGa3Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "63af2d3e4cac0a84a87b72be0135f5bcec5a9d5d",
"rev": "cd11c02c286a996ff55010146baecae4c413634f",
"type": "github"
},
"original": {
@ -169,11 +185,11 @@
},
"nixpkgs-master": {
"locked": {
"lastModified": 1623850764,
"narHash": "sha256-UKfS995C9frZzt3A1D5oVlh7aiFVx9RcVJO+Db3kzJ0=",
"lastModified": 1624262323,
"narHash": "sha256-VljhECP+fZYr15+KacCdklDY36CePr1y89Y2fvmaaQo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0082e65f4fe8b7d921e8a1b3f7474e0f484037b6",
"rev": "44b5c7496099b9b310c15ff194e556c082f9246c",
"type": "github"
},
"original": {
@ -189,11 +205,11 @@
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1623846897,
"narHash": "sha256-GEH3W346D39t9inR8+0Q3z6CvNQWlq+BYhC7jLdi0iI=",
"lastModified": 1624257038,
"narHash": "sha256-k9QnxUDXYeXlZqS1yjTgUyzE3ZFHILKlyh1uTr6hoj4=",
"owner": "colemickens",
"repo": "nixpkgs-wayland",
"rev": "f89f9c1ade0fbc215819e6a1d984485e98c24598",
"rev": "a2a22cf9575b02a01739708aa71a1ed73331ecbc",
"type": "github"
},
"original": {
@ -219,10 +235,10 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1623324058,
"narHash": "sha256-Jm9GUTXdjXz56gWDKy++EpFfjrBaxqXlLvTLfgEi8lo=",
"path": "/nix/store/v13yb14bkddyc1rxlrna5j3441pyh0r8-source",
"rev": "432fc2d9a67f92e05438dff5fdc2b39d33f77997",
"lastModified": 1623580589,
"narHash": "sha256-Ayp1cjXpwFCkAiWUE46rj9APTltsiEBdIs2+cj+U7+c=",
"path": "/nix/store/p5d2qhw8hw4ishxpwznx2lm48jgwqb3d-source",
"rev": "fa0326ce5233f7d592271df52c9d0812bec47b84",
"type": "path"
},
"original": {
@ -232,11 +248,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1623580589,
"narHash": "sha256-Ayp1cjXpwFCkAiWUE46rj9APTltsiEBdIs2+cj+U7+c=",
"lastModified": 1624024598,
"narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fa0326ce5233f7d592271df52c9d0812bec47b84",
"rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
"type": "github"
},
"original": {
@ -248,11 +264,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1623580589,
"narHash": "sha256-Ayp1cjXpwFCkAiWUE46rj9APTltsiEBdIs2+cj+U7+c=",
"lastModified": 1624024598,
"narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fa0326ce5233f7d592271df52c9d0812bec47b84",
"rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
"type": "github"
},
"original": {
@ -280,6 +296,7 @@
},
"root": {
"inputs": {
"2i-emulator": "2i-emulator",
"emulator-2a": "emulator-2a",
"gruvbox-material-gtk": "gruvbox-material-gtk",
"home-manager": "home-manager",
@ -315,11 +332,11 @@
"sway": {
"flake": false,
"locked": {
"lastModified": 1623597753,
"narHash": "sha256-uWoBCC++R1jcU6zTFrTtC+wGaiaRa6/3z1PlR5A62e8=",
"lastModified": 1624217944,
"narHash": "sha256-0f8ejGCJFkHnh3Z6JuEAOaBG1t1LsaldPPETAaNfPik=",
"owner": "swaywm",
"repo": "sway",
"rev": "75a4122f7a8b7313a090587d5e0074c7636c0fae",
"rev": "dbc326ba84037252da89d1140fe6113556600314",
"type": "github"
},
"original": {
@ -346,11 +363,11 @@
"wlroots": {
"flake": false,
"locked": {
"lastModified": 1623583050,
"narHash": "sha256-rvBFR7MnH64CM9DuNNtnVj02/Zs3DJGrFXjkH9XAM2A=",
"lastModified": 1624223828,
"narHash": "sha256-FBOIBlH9i35I5mfDPBy+3ti6I/bsJ6AiprGA6OoaIg4=",
"owner": "swaywm",
"repo": "wlroots",
"rev": "6259fd23fbaecbea5a5fb71f2a0bf3735b4c17cd",
"rev": "2f615468b68d49c8ec03ceffa751f8425d4c9b6b",
"type": "github"
},
"original": {

View file

@ -27,6 +27,10 @@
url = "github:mobile-shell/mosh";
flake = false;
};
inputs."2i-emulator" = {
url = "github:klemens/2i-emulator";
flake = false;
};
outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs:
let

View file

@ -50,6 +50,7 @@ in {
(fixElectronWayland "signal-desktop" bleeding.signal-desktop)
(fixGdkWayland "Discord" discord)
(script "hwp2021pizzazz" ../scripts/hwp2021pizzazz.py)
(pkgs.callPackage ../pkgs/2i-emulator.nix { })
bleeding.tdesktop
feh
firefox

24
pkgs/2i-emulator.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib, fetchFromGitHub, rustPlatform }:
let lock = builtins.fromJSON (builtins.readFile ../flake.lock);
in rustPlatform.buildRustPackage {
pname = lock.nodes."2i-emulator".original.repo;
version = lock.nodes."2i-emulator".locked.rev;
src = fetchFromGitHub {
owner = lock.nodes."2i-emulator".locked.owner;
repo = lock.nodes."2i-emulator".locked.repo;
rev = lock.nodes."2i-emulator".locked.rev;
sha256 = lock.nodes."2i-emulator".locked.narHash;
};
cargoSha256 = "sha256-FUtOLYFPRFkUAXixcUzMfDmKju/GN6r/KQYqKCK8vBk=";
meta = with lib; {
description =
"Cli emulator for the micro computer 2i used in the computer science hardware course at Leipzig University";
homepage = "https://github.com/klemens/2i-emulator";
license = licenses.gpl3;
maintainers = [ ];
};
}