diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-06-26 09:00:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 09:00:43 +0200 |
commit | 7dc9a7b9107b2607e9870d7fc92fb2d40505f7ef (patch) | |
tree | 3b1bfe9958b324b5bd0768b48bfa76aaaa3eecc7 /nix-import-tools | |
parent | afcdb1184799526f20954e475af990254d772cd4 (diff) | |
parent | e65cf1d265210738a9b3c0b811fbfeffa0741c39 (diff) | |
download | hello-nix-7dc9a7b9107b2607e9870d7fc92fb2d40505f7ef.tar.gz |
Merge pull request #2 from aehlig/import-rules
Import rust rules and add a minimal example
Diffstat (limited to 'nix-import-tools')
-rw-r--r-- | nix-import-tools/default.nix | 2 | ||||
-rw-r--r-- | nix-import-tools/import-tools.nix | 41 |
2 files changed, 43 insertions, 0 deletions
diff --git a/nix-import-tools/default.nix b/nix-import-tools/default.nix new file mode 100644 index 0000000..e8f8026 --- /dev/null +++ b/nix-import-tools/default.nix @@ -0,0 +1,2 @@ +{ nixpkgs ? import <nixpkgs> {} }: +nixpkgs.callPackage ./import-tools.nix {} diff --git a/nix-import-tools/import-tools.nix b/nix-import-tools/import-tools.nix new file mode 100644 index 0000000..cfb7a91 --- /dev/null +++ b/nix-import-tools/import-tools.nix @@ -0,0 +1,41 @@ +{ stdenv +, fetchFromGitHub +, python3 +}: + +stdenv.mkDerivation rec { + name = "just-import-tools"; + version = "2024-06-25"; + + buildInputs = [ (python3.withPackages (ps: [])) ]; + + srcjust = fetchFromGitHub { + owner = "just-buildsystem"; + repo = "justbuild"; + rev = "v1.3.1"; + sha256 = "sha256-kv7HpDEYZml5uk06s8Cxt5rEpxaJBz9s+or6Od1q4Io="; + }; + + srcrustrules = fetchFromGitHub { + owner = "just-buildsystem"; + repo = "rules-rust"; + rev = "bf3e05a614f1de5a9a8a0f8e40f1dd9e1f6609da"; + sha256 = "sha256-8y10ZmZpeTGtbkIeneaVISyMbVKfIi3gHqyvztnKn0M="; + }; + + + unpackPhase = '' + cp $srcjust/bin/just-import-git.py . + cp $srcrustrules/bin/hdump.py . + ''; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp just-import-git.py $out/bin/just-import-git + cp hdump.py $out/bin/hdump + chmod 555 $out/bin/just-import-git $out/bin/hdump + ''; + +} |