mirror of
https://github.com/Feliix42/mlir.nix.git
synced 2024-11-23 19:16:29 +00:00
Compare commits
No commits in common. "cb759f2c817155b3a68a81fa8d7ef7526ea08058" and "74c441cc29c688b02eec6343f44b6e68e45d2d72" have entirely different histories.
cb759f2c81
...
74c441cc29
2 changed files with 22 additions and 22 deletions
|
@ -2,16 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690370995,
|
"lastModified": 1681269223,
|
||||||
"narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=",
|
"narHash": "sha256-i6OeI2f7qGvmLfD07l1Az5iBL+bFeP0RHixisWtpUGo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341",
|
"rev": "87edbd74246ccdfa64503f334ed86fa04010bab9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-23.05",
|
"ref": "nixos-22.11",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
36
flake.nix
36
flake.nix
|
@ -2,15 +2,15 @@
|
||||||
description = "Custom-Built MLIR Tools";
|
description = "Custom-Built MLIR Tools";
|
||||||
|
|
||||||
# Nixpkgs / NixOS version to use.
|
# Nixpkgs / NixOS version to use.
|
||||||
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
|
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
|
|
||||||
# git revision to use (for version and git pull
|
# git revision to use (for version and git pull
|
||||||
#llvmRevision = "llvmorg-17-init";
|
#llvmRevision = "llvmorg-17-init";
|
||||||
llvmRevision = "0a35ac6c2e0cb0160ca2e6cc11644c263692a46d";
|
llvmRevision = "010a97974a158ebca0bdb58346a2b303ab8a401e";
|
||||||
circtRevision = "720846dd1611a336424e0d8a4ae81fd53b220ced";
|
circtRevision = "4937a94071b4a3e15c740ae445e14b47e1f8154e";
|
||||||
|
|
||||||
# to work with older version of flakes
|
# to work with older version of flakes
|
||||||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
||||||
|
@ -26,23 +26,23 @@
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
# Nixpkgs instantiated for supported system types.
|
# Nixpkgs instantiated for supported system types.
|
||||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlays.default ]; });
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
# A Nixpkgs overlay.
|
# A Nixpkgs overlay.
|
||||||
overlays.default = final: prev: {
|
overlay = final: prev: {
|
||||||
|
|
||||||
mlir = with final; llvmPackages_16.stdenv.mkDerivation rec {
|
mlir = with final; llvmPackages_14.stdenv.mkDerivation rec {
|
||||||
name = "mlir-${version}";
|
name = "mlir-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "llvm";
|
owner = "llvm";
|
||||||
repo = "llvm-project";
|
repo = "llvm-project";
|
||||||
rev = llvmRevision;
|
rev = llvmRevision;
|
||||||
sha256 = "sha256-e8Rr1NZznjnNo3GvD1VSx8yb2ZcUdM2LtZDyNnwIJdU="; # lib.fakeSha256;
|
sha256 = "sha256-iZBZcHYW/rJm+4KAcNZGwryKsYsEQNi1LTpS0Mnm08A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "source/llvm";
|
sourceRoot = "source/llvm";
|
||||||
|
@ -53,9 +53,9 @@
|
||||||
cmake
|
cmake
|
||||||
ncurses
|
ncurses
|
||||||
zlib
|
zlib
|
||||||
llvmPackages_16.llvm
|
llvmPackages_14.llvm
|
||||||
llvmPackages_16.clang
|
llvmPackages_14.clang
|
||||||
llvmPackages_16.bintools
|
llvmPackages_14.bintools
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
"-DCMAKE_C_COMPILER=clang"
|
"-DCMAKE_C_COMPILER=clang"
|
||||||
"-DCMAKE_CXX_COMPILER=clang++"
|
"-DCMAKE_CXX_COMPILER=clang++"
|
||||||
"-DLLVM_ENABLE_LLD=ON"
|
"-DLLVM_ENABLE_LLD=ON"
|
||||||
#"-DLLVM_USE_LINKER=${llvmPackages_16.bintools}/bin/lld"
|
#"-DLLVM_USE_LINKER=${llvmPackages_14.bintools}/bin/lld"
|
||||||
# CCache can drastically speed up further rebuilds, try adding:
|
# CCache can drastically speed up further rebuilds, try adding:
|
||||||
#"-DLLVM_CCACHE_BUILD=ON"
|
#"-DLLVM_CCACHE_BUILD=ON"
|
||||||
# libxml2 needs to be disabled because the LLVM build system ignores its .la
|
# libxml2 needs to be disabled because the LLVM build system ignores its .la
|
||||||
|
@ -100,14 +100,14 @@
|
||||||
# '';
|
# '';
|
||||||
};
|
};
|
||||||
|
|
||||||
circt = with final; llvmPackages_16.stdenv.mkDerivation rec {
|
circt = with final; llvmPackages_14.stdenv.mkDerivation rec {
|
||||||
name = "circt-${version}";
|
name = "circt-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "llvm";
|
owner = "llvm";
|
||||||
repo = "circt";
|
repo = "circt";
|
||||||
rev = circtRevision;
|
rev = circtRevision;
|
||||||
sha256 = "sha256-iPt50T5+yqTnZKzgR5C6UW97XXfiKR1vXzXTNnvZOjE="; # lib.fakeSha256;
|
sha256 = "sha256-jptvNvrTF52vh0NyLqo4Iv6Ov9qttluERZgXsnayKa8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "source/";
|
sourceRoot = "source/";
|
||||||
|
@ -118,9 +118,9 @@
|
||||||
cmake
|
cmake
|
||||||
#ncurses
|
#ncurses
|
||||||
#zlib
|
#zlib
|
||||||
#llvmPackages_16.llvm
|
#llvmPackages_14.llvm
|
||||||
llvmPackages_16.clang
|
llvmPackages_14.clang
|
||||||
llvmPackages_16.bintools
|
llvmPackages_14.bintools
|
||||||
mlir
|
mlir
|
||||||
lit
|
lit
|
||||||
];
|
];
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
nixosModules.mlir =
|
nixosModules.mlir =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ self.overlays.default ];
|
nixpkgs.overlays = [ self.overlay ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.mlir ];
|
environment.systemPackages = [ pkgs.mlir ];
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
nixosModules.circt =
|
nixosModules.circt =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ self.overlays.default ];
|
nixpkgs.overlays = [ self.overlay ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.circt ];
|
environment.systemPackages = [ pkgs.circt ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue