Created
August 7, 2023 10:06
-
-
Save blackheaven/1f17a4415a10d5b7c68821bc5d09358b to your computer and use it in GitHub Desktop.
Simplest derivation ever
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": { | |
"flake-utils": { | |
"inputs": { | |
"systems": "systems" | |
}, | |
"locked": { | |
"lastModified": 1689068808, | |
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"type": "github" | |
} | |
}, | |
"nixpkgs": { | |
"locked": { | |
"lastModified": 1691186842, | |
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=", | |
"owner": "NixOS", | |
"repo": "nixpkgs", | |
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "NixOS", | |
"ref": "nixos-unstable", | |
"repo": "nixpkgs", | |
"type": "github" | |
} | |
}, | |
"root": { | |
"inputs": { | |
"flake-utils": "flake-utils", | |
"nixpkgs": "nixpkgs" | |
} | |
}, | |
"systems": { | |
"locked": { | |
"lastModified": 1681028828, | |
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
"owner": "nix-systems", | |
"repo": "default", | |
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "nix-systems", | |
"repo": "default", | |
"type": "github" | |
} | |
} | |
}, | |
"root": "root", | |
"version": 7 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "mdeverything"; | |
nixConfig.extra-trusted-substituters = "http:/localhost:8080"; | |
nixConfig.extra-trusted-public-keys = | |
"ci:ownPA2gWz4niO8YrdaJOaFQVdkA9SeqZ45g551NDQS0="; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = inputs@{ self, nixpkgs, flake-utils, ... }: | |
# flake-utils.lib.eachDefaultSystem | |
flake-utils.lib.eachSystem [ flake-utils.lib.system.x86_64-linux ] | |
(system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
in | |
rec | |
{ | |
packages.mdeverything = | |
pkgs.stdenv.mkDerivation | |
{ | |
name = "mdeverything"; | |
src = ./.; | |
buildInputs = [ pkgs.coreutils ]; | |
unpackPhase = "true"; | |
buildPhase = '' | |
cd $src | |
md5sum in.txt > "$out" | |
''; | |
}; | |
defaultPackage = packages.mdeverything; | |
devShell = | |
pkgs.mkShell { | |
buildInputs = [ | |
]; | |
inputsFrom = [ | |
# self.defaultPackage.${system}.env | |
]; | |
}; | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment